TFS204018 error when installing NuGet Package in VS2015 - tfs

Whenever I install a NuGet package in a TFS source-controlled VS 2015 project, I get a message similar to the following output under "Source Control - Team Foundation":
TF204018: Could not check the file's encoding because the file C:\TFS\Oz.Interfaces\Main\Source\MVRSTamperCodes\MVRSTamperCodes.Web\web.config is in use.
I've been searching fruitlessly to see if there's a way to fix this issue and haven't found anything yet. Does anyone know what is causing this message and/or what steps I can take to fix it? I should note that this doesn't prevent the successful installation of the NuGet package so it appears to just be a warning or informational message.

I've met similar issue with blocking web.config and other files. My solution was:
Uninstall NuGet Package Manager (Tools -> Extensions and Updates)
Install newest version (currently: Nuget 3.2)

If you're using Team Foundation Server, you will need to first check out the entire project, before updating Nuget Packages for the project, if you have this problem.

Related

Package installation error when new blank application in nanoframework is created

When i try create new blank application in nanoframework, i get package installation error.
error message
It seems some problem in nanoframework visual studio extension, my version is NET nanoFramework VS2019 Extension v2019.5.0.8.vsix, but i also tried another versions with same problem.
I have visual studio 2019 community edition and i have installed almost all components.
When i press ok, project is loaded, but is not possible compile it, because there are missing all assemblies. When i try add assembly, theres nothing to add and add nuget packages from nanoframework store leads to error.
when i try this:
pm> Install-Package nanoFramework.CoreLibrary.NoReflection -Version
1.10.1-preview.9
I get this error:
NU1202: Package nanoFramework.CoreLibrary.NoReflection
1.10.1-preview.9 is not compatible with netnanoframework10 (.NETna noFramework,Version=v1.0). Package
nanoFramework.CoreLibrary.NoReflection 1.10.1-preview.9 supports: net
(.NETFramework,Version=v0.0)
similiar when i try another package versions.
So the extensions is installed incorectly, but i cant find why. i tried it more times. uninstall and install again. from extenstion store, and from disc. nothing successfull.
The webserver NuGet released today fixes the issues with the version mismatches.
The issue with VS2019 16.9 remains. Reported to VS Developer Community here. Please up vote to help increase priority.
What is the Community version you're using?
After a little test, there seems to be an issue with the latest release of VS2019. A work around would be to:
Use V16.8.X
or
use an already created solution that you can edit.
or
add the required nuget to the project once it has been loaded (after the error):
Update: now fixed! it was due to a change to fix nuget, but caused an unintended consequence with nanoFramework.

"The build task could not find node.exe which is required to run the TypeScript compiler." occurred after update Boostrap

I developed an ASP.Net MVC web application and It's almost completed. After That, I updated Bootstrap through NuGet package manager to Bootstrap latest stable version 4.3.1 Update was successfully completed. But after the migration following errors are occurred.
Error Build:Cannot find name 'Record'.
Error Build:Cannot find name 'undefined'.
To solve that I installed TypeScript for Visual Studio 2015. Then the above error solved and the following error occurred.
Severity Code Description Project File Line Suppression State
Error The build task could not find node.exe which is required to run
the TypeScript compiler. Please install Node and ensure that the
system path contains its location. ABH.SW.HotelManagement
How can I solve this? I tried to google it for the past 2 days but I wasn't able to find any solution
This is the only post for this problem, so I'll do my bit for those who use Bootstrap 4.3.1, TypeScript, and VS2015.
First, once you create the project and are about to install Bootstrap 4.3.1 through NuGet, don't let Visual Studio manage TypeScript Typings for you. Check no.
Once Bootstrap and stuff is installed, clean the solution: right click on your solution -> clean solution
Next, open NuGet console (Tools → NuGet Package Manager → Package Manager Console), and install TypeScript 3.0 using this command:
Install-Package Microsoft.TypeScript.MSBuild -Version 3.0.0
Close Visual Studio, open it again, and that's it. Took for me a lot of research to find out that several TypeScript versions cause a lot of conflicts and 3.0 is one of those that actually work.
I had the same issue while trying to update to Bootstrap 4 from Visual Studio 2015. What fixed it for me was installing Typescript 2.2 for Visual Studio 2015 (https://marketplace.visualstudio.com/items?itemName=TypeScriptTeam.TypeScript22forVisualStudio2015). You may need to uninstall previous versions of Typescript Tools for VS2015 from Programs and Features.
I think Bootstrap 4.3.1 , Typescript , VS2015 has some issues with each other.
[e.g.
Compilation error from Angular and typescript in VS 2015 MVC project
]
My scenario in my project got this error
Error The build task could not find node.exe which is required to run
the TypeScript compiler. Please install Node and ensure that the
system path contains its location. ACC_Cor...
I'm using VS2017 while other team member that has problem using VS2015 with TypeScript Tools for Microsoft Visual Studio 2015 3.2.2.0 installed
He told me that after map project from source control there is and alert message of something like his typescript version is newer. So after some googling I think you should look in to this link for more information
https://github.com/Microsoft/TypeScript/issues/17136
VS2015 - Change TypeScript Version
How to run TypeScript in Visual Studio 2015 without require() or requireJS
tldr;
For Vs2015 + Bootstrap 4.3.1 I solved my issue by
Check project property
Uninstall Typescript
Install Typescript version 3.0 https://www.microsoft.com/en-us/download/details.aspx?id=48593

Update Packages of a MVC Project

Im trying to use an ASP.NET web application downloaded from the internet. Im looking for a way restore all the dependencies/packages in a quick way (clean and building the project did not solve it), rather than installing them via nuget one by one. Is there anyway to download and install/resolve (version issues) all the necessary packages at once?
I tried below package manager console commands, but they did not resolve the package conflicts.
Update-Package -Reinstall,
nuget install packages.config and other solutions here - How do I get NuGet to install/update all the packages in the packages.config?
[resolve/install packages]
Can someone help? Maybe Im using wrong commands or doing something wrong.
If you go into Tools > Nuget Package Manager > Manage Nuget Packages for Solution, it will show a yellow bar at the top asking you if you want to restore missing packages. That's a manual way, but there are also some important VS options you want to look at as well, one being an option to restore packages on build.
There is a generic restore option as well from the package manager console, and that should have worked if it was simply a matter of reimporting the missing packages...
Update-Package -reinstall
You can try to delete the folders, than reinstall using these options. However, is there a possibility there is a .NET framework version mismatch with the version of the DLL's? Maybe some of the DLL's need updated?
Remove package folders from Package folder - don't remove package.config. Next, build you application - nuget should automatically restore all packages.

TFS does not allow the NuGet packages to be installed/Updated

I am in VS2015/TFS environment and I have been having this constant issue with TFS Source Control:
Every time I want to install the package, it fails with following error
Install failed. Rolling back... Package 'jQuery.Cookie 1.4.1' does not
exist in project 'Web'
This is the same exact error that I see every time I try to install any of the packages.
Currently, I have been taking a copy of my project folder and then put it somewhere where I do not have any SourceControl, then I install the package and copy it back to its original location
The only problem with this approach is that it is a lot of tedious work everytime I want to install a new package
Also, all the packages installed in this manner are not recognized by the source Control and that is why I have to add each file saperately. Not to mention that since it is not as accurate as having Nuget taking care of everything for me, sometimes I miss to check in some of the files and it breaks things on the server.
Can someone guide me on how can I smoothly install an new NuGet package on VS 2015 without having to go through this tedious process?
It seems to be caused by the bug in old nuget version: Install package fails when solution/project is bound to TFS source control
Update nuget to latest version and then try again.

NuGet doesn't show installed packages

I have MVC 5 project and I use NuGet to install packages. Yesterday I have installed a couple of packages, but today when I run my application I got an error of missing references. I've realized, that my project doesn't have any of references and files that were added from NuGet.I have all this packages in packages folder in my app, but no records about this packages in packages.config file. If I click Manage NuGet Packages in my solution explorer, in online search it shows me all my packages as installed, but in all installed tab it doesn't show me any of them! I didn't do anything since yesterday? What could happened and how to fix all my packages?
I have had this happen from time to time. There are two things that you can try:
Right click your solution in 'Solution Explorer' and select 'Enable NuGet Package Restore'
Close and Reopen VS
Try Rebuild
Otherwise, just uninstall/reinstall each package.
Hope that helps!
Sometime you added new package does't support to your .net framework which is currently active, so active related .net framework as well.
I just have experienced the same problem. In my case, two different versions of a sample package in the packages.config file causing the problem. After removing the older version of the package from the file, VS shows the list normally.

Resources