Using: Visual Studio 2012 ultimate with Update 4
Problem: Every time I use update-package, it redownloads the same version.
Scenario:
1. I fire up VS2012, make new project Asp.NET MVC4 Web Application -> Internet Application.
2. I type 'update-package' in package manager console. Downloads every package update. I save the solution. Exit.
3. I create a new project Asp.NET MVC4 Web Application -> Internet Application.
4. Since packages are not updated, I type 'update-package' again.
But when I do, it will DOWNLOAD again the SAME version that I already downloaded during my first project.
My problem is, I am not always connected to the internet so do I have to find internet connection everytime I 'update-package' to update the template.
Is there a way I can save the package updates locally so when I do 'update-package' I dont have to be connected to the internet to update all the packages?
You can create folder for nuget packages, for example D:\NugetLocalSource\, and add specify it as package source in nuget settings. Tools -> Nuget Package Manager -> Packages Manager Settings -> Package Sources -> Add.
When you updated packages first time they were downloaded to solution_folder\packages\. You can copy *.nupkg files from packages folder to you local source and then will you be able use them offline for other solutions.
Or you can pre-download packages from nuget.org another way.
One more place where you can find downloaded packages locally - it's nuget cache. It's placed in C:\Users\<user>\AppData\Local\NuGet\Cache. Here is nice article about how to use it
Related
We are creating an HoloLens 2 app.
Our installed NuGet packages are:
Hyak.Common
Microsoft.Azure.Common
Microsoft.Azure.Cosmos.Table
Microsoft.Azure.DocumentDB.Core
We want to use the library "Microsoft.Azure.Cosmos.Table" for our Azure Storage Account table storage.
We are working with Unity 2018.4.22f1 and Visual Studio 2019. When we try to use Microsoft.Azure.Cosmos.Table we get this error:
The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Everytime we reinstall the nuget "Microsoft.Azure.Cosmos.Table" it works at first. When we restart visual studio 2019 the error appears again
using Microsoft.Azure.Cosmos.Table doesn't work in a UWP project
Please try the following steps:
1) disable any third party extensions under Extensions--> Manage Extensions in case some extensions cause this and after that, you should restart VS
2) delete all component caches under C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\16.0_xxx\ComponentModelCache
3) clean all nuget caches, delete bin and obj folder and then restart your project.
4) try to create a new project and then install these four nuget packages to test whether this strange behavior appears in the new project.
Or you could create a new project to migrate your old project into the new project to test whether the issue still persists.
If still faces the same error, please try step 5
5) repair vs in vs installer or if there is any update for VS, please update it.
Update
=============================
After a deep research, I think the issue is that your uwp project's target version is not compatible with that package's version.
So the solution is that you should
set the uwp project min target to >=Windows 10 Fall Createors Update(10.0;Build 16299) and target version >=Windows 10,version 1809(10.0,Build 17763).
Also, use the latest nuget package Microsoft.Azure.Cosmos.Table 1.0.7 version
I am working with Visual Studio 2017. I started from; Basic Node.js Express 4 Application.
I have a private Nuget in VSTS which has a .Net tool I would now like to use in the Node.js project (to perform some domain specific build-like tasks).
Is it possible to add a Nuget reference into a Node.js project (just to download the tool)?
I've seen that VSTS provides npm, but this would seem to be incompatible with my existing Nuget packages.
Is it possible to add a Nuget reference into a Node.js project (just to download the tool)?
I am afraid you can not do that at this moment.
Because Nuget does not currently support the node.js project even if you just download the tool. When you use nuget on the node.js project, we always get the error 'Project "Default" is not found.'. npm is the right solution for package management for node.js project.
See similar issues on GitHub for some more details:
Cannot install packages in Node.js project - Project "Default" is not found
Nuget package manager cannot 'see' Node.JS projects
Hope this helps.
i'm working on a xamarin forms app with azure however when I load my initial page it crashes on the line:
public static MobileServiceClient MobileService =
new MobileServiceClient(
"https://myapp.azurewebsites.net");
with exception:
System.PlatformNotSupportedException "The empty PCL implementation for
Microsoft Azure Mobile Services was loaded. Ensure you have added
nuget package to each of your platform projects."
How do I fix this?
It might mean that the NuGet packages did not install correctly in one of your platforms. I would suggest doing a force-reinstall of all NuGet packages using the Package Manager Console (Tools/NuGet Package Manager/Package Manager Console).
Update-Package -reinstall
Do this for all projects in your solution. Once done, close and reopen Visual Studio, open your solution and click Build in the top menu and do Clean Solution.
Now look into each of your platform projects in turn to see if you have a Microsoft.Azure.Mobile.Client reference there:
If it is not there, install the Microsoft.Azure.Mobile.Client package again in that given project.
Then you should proceed as described in any tutorial on Azure Mobile Services. Even if you use the Shared Project strategy in you Xamarin.Forms app, it should work as expected once the platform project has Microsoft.Azure.Mobile.Client installed.
If it does not help, as the last resort I would suggest trying to update all NuGet packages to their last version (right-click solution, Manage NuGet Packages for Solution...)
Make sure that you add the initialization code in the respective AppDelegate/MainActivity
CurrentPlatform.Init();
And that in the iOS, Android and PCL projects there is the reference to the Microsoft.Azure.Mobile.Client package.
Example
It instantiates the MobileServiceClient in the TodoItemManager class.
I'm having an issue related to team foundation server with Visual Studio 2012.
I've checked in a new solution to the server, however when i get latest version for other machines, most of the references are missing and the .dll files in the bin cannot be located.
Is this because the files are not being pushed when i check in.
Any help is appreciated thanks
In Solution Explorer, right click the DLLs that aren't being included, go to Properties, and be sure that the Build Action is set to "Content".
Check whether you are using MSBuild-Integrated solutions or using Automatic Package Restore. If you use MSBuild-Integrated solutions, migrating MSBuild-Integrated solutions to use Automatic Package Restore.
If you haven't used Nuget to restore package. Check: https://docs.nuget.org/consume/package-restore
Check whether your project link to other projects. Don't reference output assemblies. Make a project reference or create a NuGet package.
Everytime I try to create a bridge.net new project I get the following error:
Could not add all required packages to the project. The following
packages failed to install from [the user appdata local
folder]\Microsoft\VisualStudio\14\extensions\IJHDC25V.XOU\Packages.
Bridge.1.10.0 : Solution is not opened or not saved. Please ensure you
have an open and saved solution.
Trying to build the project leads to the 'Bridge' namespace missing.
I did the following:
Download the bridge.net .vsix package from
https://visualstudiogallery.msdn.microsoft.com/dca5c80f-a0df-4944-8343-9c905db84757
Run the package
Create a new project -> Bridge.net -> Class Library
Named the project 'Demo'
I verified the folder exists and is populated. I've tried running Visual studio as an administrator and as a standard user.
How do I get a working blank Bridge.net project with the visual studio template?
I realise that this doesn't quite answer precisely the question asked but I don't use the VSIX package to create Bridge.NET projects, I just create a new (standard) class library and then use NuGet to add "Bridge". This adds the Bridge compiler and it adds a "demo.html" file and a basic "bridge.json" config file to get you started. (If you wanted to write a Bridge library and you didn't want the "starter park" items then you can add the NuGet package "Bridge.Min" instead).
The project needs to be saved to disk.
In Visual Studio under Tools / Options / Projects and Solutions tick the Save new projects when created checkbox.
Then create a new project.