Could I remove the folder C:\Program Files\dotnet\sdk\NuGetFallbackFolder\ or move it to other folder? (better not in disk C)
If could remove, how to remove? delete the folder directly? any side effects or damages?
If could move, how to move? target folder like D:\NuGetFallbackFolder? How can I do it?
This folder contains a set of Nuget packages that the SDK expects to use. It's used as a nuget source whenever dotnet is trying to resolve nuget packages. Removing is generally similar to removing your nuget cache: .NET Core will simply not find the packages and download them into the (normal, non-NuGetFallbackFolder) local nuget cache.
Some distributions of .NET Core do not contain the NuGetFallbackFolder. The only consequence is that dotnet will download all those packages as soon as it needs them (possibly on the first SDK command).
If you move it around, .NET Core won't know about the new location and just treat it as if you had deleted the directory. On Linux, I would use a symlink to point from the old location to the new one. I don't know if Windows supports that.
after searching the internet and trying some in vain:
deleting the NuGetFallbackFolder in the corresponding .NET SDK and
repairing in Windows Uninstall Programm helps really
in my case it worked : the build process in solution got all new in
Related
So this is my problem:
I currently have an existing Umbraco Website, v7.2.1, not installed with Visual Studio, so there is no solution file.
I want to migrate this site to the typical Umbraco solution, so I can run it locally, and make it more familiar to my way of working with Umbraco.
I have tried to create an .NET project and installed the Umbraco Core nugget (also version 7.2.1) followed by importing the website. With no avail.
I rather not move everything manually into a new Umbraco solution.
Help me Umbraco community, you're my only hope.
It depends on how much customization has been done, I think?
I would probably install UmbracoCms -version 7.2.1 (not "just" Core) from Nuget into a fresh solution, build it and then point the connection string to the existing database (if not an .sdf file already). Then you'll (hopefully) only have to copy over folders like /Views and /config plus whatever scripts/styles folder you have, I think? Once copied over, all you have to do is include the folders in your project, and voila.
Unless that too is too much "manual" work? ;-) I'm not sure if you could get by with creating a package on the original site (with templates, doctypes, content, styles, scripts and everything) and importing it into a new, blank site :-s
Again, if you have installed any packages either via Umbraco Package Repository or Nuget, or indeed if you have made changes to /umbraco or /umbraco_client, I don't see any other way to do it other than manually copying them over.
Try doing a, complete, fresh install of Umbraco 7.2.1, then literally copy all the files from the current site, and simply paste and replace them into the new Umbraco solution. That should work.
This is indeed "manual work", but you can literally move all files at once and just overwrite the existing ones in the newly created solution.
Good luck.
Like Jannik said, it depends how much you've build around your current solution and what exact results you're expecting.
Option 1 - WebSite project
You can easily create an empty solution in VS and add new Web Site project (ASP.NET Empty Web Site). Then, paste and include all the files from your current location. You'll have new solution and VS project with your files / website.
Option 2 - ASP.NET Application
If you would like to have it as a ASP.NET app, I would follow these steps (almost the same as Jannik's steps described above):
Create empty ASP.NET Web Application in Visual Studio.
Nuget: Install package -UmbracoCms -version 7.2.1
Repoint connection string to current site database (or replace SDF database file in App_Data directory if it was on SQL CE).
Analyze what packages you've used and try to also install them from Nuget (if they have Nuget packages). If not - move them manually (DLLs etc.).
Copy all static files from your current site (App_Plugins, Configs, Views, Partials, MacroScripts, Scripts, CSS etc.).
But I see also the 3rd option, which may interest you especially if you want to kill two birds with one stone and update Umbraco to the latest version at the same time.
Install uSync and uSync Content Edition on your current website. Perform Full Export. Read more: https://our.umbraco.org/projects/developer-tools/usync/.
Create empty ASP.NET Web Application in Visual Studio.
Nuget: Install package -UmbracoCms
Install uSync and uSync Content Edition on your new web app.
Install all packages used in the previous version.
Copy files from uSync folder in old website and place them into the new one. Perform Import / Full Import.
About: I have a ASP.NET website (not Web project) with 3 class library projects in the solution. Earlier I was using SVN but now Git is used source management. I have installed the git locally on a computer (used as server) and using it for merging the source code from other developers. Also, I am using Visual studio 2015 community edition which provides the tools to work with git.
Problem: After cloning the project from the master repository, I build the project to run it. Building the project shows a dialog box saying "Package Restore is in progress". This process creates a folder named "Packages" and that folder includes every package listed in the packages.config file. But after restoration completes, the project throws the following exception:
This exception shows for each package (Autofac here).
The type or namespace name 'Autofac' could not be found (are you missing a using directive or an assembly reference?)
Work around To Solve this problem, I need to uninstall each package and installed it again and problem is solved. This thing I need to do again and again for each developer machine, which is frustrating and time consuming too.
Does anyone has faced the same problem working with Nuget, git and website in ASP.NET.
I faced a problem like this before. In my case, the reason was that I changed the project path (moved the project to another directory), and the path of the packages directory (that contains the NuGet packages) was stored in the csproj file for the old path, that is VS cannot restore NuGet packages. The solution for this was to edit the csproj manually and make it referring to the correct new packages path.
If this doesn't work for you, you can still use your workaround, but using the following PowerShell command (in NuGet Console) for simplicity:
Update-Package -reinstall -Project Your.Project.Name
Note: project name doesn't contain csproj extension, just the project name
It is good practice to not put third party packages into source control. It bloats your repository (even on a large web application, the size of the external packages will massively out weigh your code).
If NuGet package restore is slow, you could look at using a local cache (this can be as simple as a shared folder) or a better internet connection.
That said, you should only have this problem once per machine. While the packages are downloading you could be giving the new team member an overview of the design…
Make sure that all of your projects are using the same target framework, when this isn't done you can often get the
type or namespace [name] could not be found
warning.
To do this, right click each of the projects in the solution explorer > Properties > Application tab > Target Framework. They should all be the same or there will be incompatibilities between the references in your projects. Here's a question regarding this, hopefully this helps.
The main reason is there no Autofac reference in packages.config file.
When you see on the screen Restore packages message box this mean that nuget package manager is trying to install all the packages which are missing in the package folder.
Try to do this step:
In Visual Studio Solution Explorer pick the project and via context menu pick Unload project
After project was unloaded via context menu pick Edit your project
Go to section group and find you Autofac Reference section
If HintPath doesnt looks like ..\packages\Autofac.4.1.1\lib\net45\Autofac.dll (Actual for 4.1.1 version) remove the Autofac reference Item
Save csproj file and reload project
Install Autofac via NuGet Package manager
Commit and push changes to git repository
Had the same problem with VS 2019. In ASP.NET, packages are updated via the .refresh files that appear in your bin folders. If these aren't checked into Git, they wouldn't be copied down to your cloned repro.
I added the .refresh files for all of my package dlls, made sure the versions and paths in the .refresh files were correct, and now everything updates as expected.
I'm new to realm db and tried to integrate it in our mobile app (Xamarin.Ios using Visual studio).
I've added the nuget to the PCL project as well as to the executable project
when building, the build fails with the following message:
1>C:\Projects\CoachApp-Fork\ExternalPackages\Realm.0.74.1\build\Realm.targets(6,5): error MSB3030: Could not copy the file "C:\Projects\CoachApp-Fork\Build\Solutions\packages/Realm.0.74.1/tools/RealmWeaver.Fody.dll" because it was not found.
There seems to be a build task in realm that tries to copy the dll, however in our solution, the nuget packages are located at a different location (configured via Nuget.Config).
any ideas how to resolve this? i cannot simply change the nuget package location, as the build server relies on this...
That was my clever trick you broke!
The problem is the location of the DLL for Fody is quite restrictive and yet the Xamarin templates have two different relative package directory locations depending on you having a multi-target project. (This was an improvement to cache packages per-solution, I think sometime in 2015.)
Can you put your own manual copy step into your build, at least for now, to put it there in advance? I realise this isn't an optimal solution but might work as a band-aid.
So I have Visual Studio 2013 (community edition) with Qt addin installed, Qt5 libraries (32bit), and I'm trying to create an executable that is independent of all development configurations (it may use static or shared libs, I don't really care at this point).
OS: Windows 7, x64.
For doing this I changed the Solution Confguration visual studio option from Debug to Release, and add all the necessary libs in Configuration Properties -> Linker -> Input -> Additional Dependencies. The application now starts only if I run it from visual IDE, If I try to start it from the generated .exe I got The application was unable to start correctly (0xc000007b) error.
I have searched and found that this error code indicates one of the following problems:
32-bit app tries to load a 64-bit DLL (not my case I think, Qt DLLs are 32bit (I have installed using this .exe: qt-opensource-windows-x86-msvc2013-5.5.0.), and I use some other .DLLs which are also 32bit).
There are some missing DLLs. (I did copy all the necessary Qt DLLs in the same folder with the final executable).
For checking what dependencies my app requires, I opened the .exe file with Dependency Walker application, this is what it shows me:
in this list were also Qt5Multimedia.dll and Qt5SerialPort.dll, I get rid of the errors by copying the .DLLs in the same folder with the .exe.
Any ideas how to solve this?
You should never do that operation manually unless the standard procedure completely fails. There is already standard tool for Qt Windows deploymend windeployqt.
It takes care about Qt DLL dependencies, makes a copy of platforms\qwindows.dll and also it makes a copy of libraries that you cannot detect with the Dependency Walker, since image plugins and some other are loaded at runtime.
You do not even need to have your Qt bin folder in your environment PATH. The simplest deployment:
copy built exe binary to a new folder
open cmd console in that folder
call windeployqt using its full path (if it is not in the system PATH) and provide your executable, for example:
c:\Qt\Qt5.5.1-vs2013-x64\5.5\msvc2013_64\bin\windeployqt.exe application.exe
As a result you have in that folder all needed Qt DLLs. Of course you can have also issues with MSVC redistributables, but those should be deployed separately and installed once per system.
The tool windeployqt has various options. It can also take care about deployment of qml related files.
Only some 3rd party libraries should be copied manually if they are used, for example OpenSSL.
Solution:
As I got deeper, I have found this answer, after doing what that answer indicates (I actually copied all the .DLLs located in \Qt5.5.0\5.5\msvc2013\bin to the folder where my .exe is located), the error message changed from The application was unable to start correctly (0xc000007b) to Application failed to start because it could not find or load the QT platform plugin “windows”.
Searching on web for more about this error, I have found from this answer that you also need the platforms folder in the same location with the .exe (which was located in Qt5.5.0\5.5\msvc2013\plugins path). After copying that folder, the application started without any problems!!!
Now I just need to delete all unnecessary .DLLs from my application folder (Dependency Walker does not offer very useful information about this), and all the deployment is done.
I have solved the problem in the same time as describing it, so I guess I will just leave this here, may help others that have the same problem.
About a week ago I noticed strange behavior with my install of Visual Studio 2013 Pro. Creating new projects always results in missing references to EntityFramework and most of the Microsoft.* components. I had reinstalled .NET 4.5 in repair mode around that time but can't recall if this problem happened before or after that install.
As it stands, I can no longer create a functioning project. I have an existing project I'm working on that will compile and run without issue, but creating any new projects (which I need for spike solutions etc) is no longer possible until this is fixed.
Screenshots follow. These are all from creating a new MVC project with all defaults accepted.
References list showing missing references
Error list upon building
Reference paths are empty (this was mentioned in another answer that did not directly address my specific question, so I'm including it)
Regedit showing .NET versions installed
Even though I have "repaired" .NET 4.5 it appears from regedit that I only have up to .NET 4 installed? Am I reading that correctly?
Also, due to network restrictions I cannot download packages from Nuget automatically -- I have to download them manually from a laptop off-network and then sneakernet them over to install. The network physically blocks all connections to Nuget, github, etc.
If allowing VS to connect to Nuget is the only viable option then I have considered installing VS on the laptop, creating the project there and installing all necessary dependencies, and then moving the project folder over to the restricted computer and continuing from there. But I don't know if that is a solution to this problem or not.
Any advice appreciated, thanks.
.
The network blocks all connections to Nuget, github, etc.
It's almost like they don't want you to be productive.
Anyway the project templates (which you seem to be talking about) reference specific NuGet packages. Packages by default are stored relative to your solution.
Place a nuget.config in your disk's root (or any point into your projects directory, if you keep them organized like C:\Dev\Visual Studio\Projects, then each of those subfolders will be file) and point in that file to a shared package directory on your development machine. Here you can dump all packages you require.