VS 2012 project references all missing-- troubleshooting techniques? - visual-studio-2012

I've downloaded a straightforward VS 2012 solution and for some reason am having trouble with the references in it-- they're all marked with yellow exclamation points, even core .Net libraries.
This isn't a problem in any of my other VS 2012 projects. I've scrubbed and redownloaded the solution several times, each with the same result.
I'm using VS 2012 Professional, update 3, and I have the .Net 4.5 runtime installed. So I think I'm caught up on the latest platform and tools.
I updated all the NuGet packages in the solution but that didn't help. Would anyone know what I can look at to see where the problem is? (I downloaded this same solution on another box and have no problems whatsoever. Both machines are running Windows 7.)

Popped open the Solution and got the following errors:
Warning 2 The command ""C:\****************\Downloads\PluralsightSpaJumpStartFinal-master\PluralsightSpaJumpStartFinal-master\.nuget\nuget.exe" install "C:\*************\PluralsightSpaJumpStartFinal-master\PluralsightSpaJumpStartFinal-master\SPAJumpStart\packages.config" -source "" -RequireConsent -o "C:***************\PluralsightSpaJumpStartFinal-master\PluralsightSpaJumpStartFinal-master\packages"" exited with code 1. SPAJumpStart
Warning 1 Package restore is disabled by default. To give consent, open the Visual Studio Options dialog, click on Package Manager node and check 'Allow NuGet to download missing packages during build.' You can also give consent by setting the environment variable 'EnableNuGetPackageRestore' to 'true'. SPAJumpStart
Looks like the references are tied into a custom nuget package, including the normal .net 4.5 references. Enabling the 'EnableNuGetPackageRestore' option should fix the issue.

Related

How to properly create an Alea GPU project? Errors on "Getting Started" code

I have done the following to create an Alea GPU project in Visual Studio 2012 Professional:
File > New > Project > F# Application
Updated NuGet Package Manager to latest version
Tools > NuGet Package Manager > Console
PM> Install-Package Alea.CUDA
PM> Install-Package Alea.CUDA.IL
Installed license using these instructions: http://quantalea.com/static/app/tutorial%5Cgetting_started%5Cinstall_license.html
Copied the code from here https://github.com/quantalea/AleaGPUTutorial/blob/master/src/fsharp/getting_started/ParallelSquare.fs into my main project file.
Build Solution.
I get the following errors:
The lines numbers and file from the GitHub link above correspond with each other.
I'm new to using Alea GPU, Visual Studio, and F#. I've tried doing what I could with the resources I have available. Although the the Alea GPU website explains what to do (install Alea through NuGet, install license, provides code, etc.) it might be targeted to users who have experience working with Visual Studio. It's also worth mentioning I have CUDA drivers installed on this machine.
I have also followed the instructions on this page, but it seems like it's still under construction: http://quantalea.com/static/app/tutorial%5Cgetting_started%5Ccreate_new_project.html. I'm not using Fody since I won't be using C#.
Thanks for reporting the web site problem. Yes, our document are under constructing. I tried your steps and I figured out how to do it correctly, which I will show you later. The issues you met are mainly because:
You are using VS2012, which by default referencing FSharp 3.0, which is a little out-of-date, we suggest to use FSharp 3.1
You forget to reference other assemblies which is used in the code, such as NUnit and FSharp.Charting
Alea.CUDA.Fody doesn't means to work with C#, it means to do AOT compile on GPU code. It uses Fody plugin to compile GPU code during MSBuild process, so your appliction doesn't need to compile GPU code in runtime.
Now, here are the steps:
Open VS 2012, upgrade nuget plugin, then new F# console application project
Expand "References" in solution explorer, and remove the FSharp.Core reference (since it is FSharp 3.0, we will replace it with new 3.1)
Go to "Package Manager Console", install some nuget packages which is used in the code:
Install-Package FSharp.Core
Install-Package FSharp.Charting
Install-Package NUnit
Now we will install Alea.CUDA.Fody (which will install Alea.CUDA by dependency). But since Fody plugin has to run some powershell script to create an FodyWeavers.xml file to configure Fody usage, and this script doesn't work well with F# project (it works with C# project). The workaround is simple, just click "save all" in VS2012 before you run Install-Package Alea.CUDA.Fody. You will see some red error in the package manager console, that is fine, it is just the Fody plugin's script doesn't work well with F# project. You can safely ignore it. After install Alea.CUDA.Fody, a file FodyWeavers.xml file will be added to your project, there you can configure how you will do the AOT compilation. I suggest you add a setting to show verbose information: <Alea.CUDA Verbose="true"/>
Now you need add some common references, since the package FSharp.Charting uses them. To do that, right click your "References" in solution explorer, and choose "Add Reference...", under "Assemblies" -> "Framework", select these assemblies:
System.Drawing
System.Windows.Forms
System.Windows.Forms.DataVisualization
Now your project is set. Please Change the building configuration to "Release".
Now let's add the source file. First right click Program.fs in solution explorer, and select "Add above" -> "New Item...", select F# source file, name it ParallelSquare.fs
Copy https://github.com/quantalea/AleaGPUTutorial/blob/master/src/fsharp/getting_started/ParallelSquare.fs into that new created file
You need modify one place: https://github.com/quantalea/AleaGPUTutorial/blob/master/src/fsharp/getting_started/ParallelSquare.fs#L139 , change this to WorkerExtension.Launch(worker, <# squareKernel #>) lp dOutputs.Ptr dInputs.Ptr inputs.Length , the reason is, the Launch method is an extension method, which the FSharp compiler in VS 2012 doesn't support it well, so we call that extension method directly (So I suggest you to use VS 2013).
Now in your Program.fs file, call the test in main function: Tutorial.Fs.quickStart.ParallelSquare.squareChart(). and then you can press "F5" to run it.
After this, I suggest you read http://quantalea.com/static/app/manual/compilation-index.html where explains the intallation, the AOT vs JIT compilation, etc.

NuGet Package restore failed for project Miscellaneous Files: Value cannot be null or an empty string. Parameter name: root. 0 0

I have such error in vs 2012:
NuGet Package restore failed for project Miscellaneous Files: Value cannot be null or an empty string. Parameter name: root. 0 0
I see that it's a bug https://nuget.codeplex.com/workitem/3780 that was fixed for version 2.8
But I can't find the 2.8 version on https://nuget.codeplex.com
Is it possible to fix the error without the installation of the 2.8 version? Or how to get the 2.8?
I fixed this by deleting the visual studio solution user options file (.suo) and then restarting VS.
UPDATE: For VS 2017, you need to delete a hidden folder named .vs located in solution directory (Thanks #Tien Dinh!)
Had the same issue with VS2013 today.
After running an update on installed packages (tools -> extensions and updates) (which included nuget),
and installing some updates for VS2013 (windows update had some), it has gone away.
So basically, check for those updates, update, and it might solve the issue.
I have VS 2013. According to the extensions manager, nuget was up to date.
Ran a manual install from the vsix site:
http://visualstudiogallery.msdn.microsoft.com/4ec1526c-4a8c-4a84-b702-b21a8f5293ca
... fixed the issue.
A simple restart of Visual Studio should clear everything up. I had the same issue in VS2013 after upgrading Web API. It was not necessary to delete the .suo.
I right clicked the solution and chose "Enable Nuget Package Restore". This fixed the problem.
This link from MSDN shows how:
http://blogs.msdn.com/b/dotnet/archive/2013/06/12/nuget-package-restore-issues.aspx
nuget visual-studio
I fixed this by enabling auto restore on nuget packages in the solution
Not an exact answer, but best I can tell, NuGet ver. 2.8 is not available yet. I have been dealing with the same issue for sometime now (2 months). I was still able to build my solution successfully even with that error by performing the build against the main project. I am really hoping to get this issue resolved because it is a serious eyesore while working.
You can get a non-release version of NuGet 2.8 here. Instructions are here: Installing a CI build. This fix the issue for me on VS2010.
I fixed this issue after clicking the "Clear All Nuget Cache(s)"
Just as a brief note. I got this error by running the project on a mapped network drive i.e. T:\NetworkFolder\Project\Solution.sln.
Obviously the solution is simple - don't do this - copy it onto your machine. Might save someone some pain at some point.
None of the above answers helped for me, and it was getting pretty frustrating.
What worked for me (with Visual Studio Professional 2017, version 15.8.5) was doing the following steps;
1) Tools > Options > NuGet Package Manager > Click 'Clear All NuGet Cache(s)'
Hope this helps someone!
It did not work for me. I had to go to tools, extension manager... Uninstall NuGet
Restart Visual Studio 2010
Download NuGet
Reinstall it.
Restart Visual Studio. Fixed it all!
Let's check the name of packages in file packages.config. Sometime the name incorrect it occurr
I got this error by accidentally renaming one of the namespace id attributes inside packages.config file to something else. I was able to track this down by comparing checked in version of packages.config, with my local one. After I corrected the problem, all I had to do is close the packages.config file, rebuild, and the problem was gone.
In Visual Studio 2015:
Go to Options->NuGet Package Manager-> Package Sources, make sure "Microsoft and .Net" is checked in the Machine-wide package list.
I uninstalled and reinstalled nUnit 3.7.1 and everything started working again. I have a few nuget packages, but nunit 3.7.1 is the only one I reinstalled, I left the rest alone.

Is MvcScaffolding compatible with VS 2013 RC by command line?

At NuGet when I try to install MvcScaffolding, by typing:
Install-Package MvcScaffolding
I am getting this error
Set-DefaultScaffolder : Cannot get an instance of EnvDTE.DTE
Is it happening because of this new scaffolding engine in Visual Studio 2013 ?
I emailed Scott Hanselman about this a few weeks back. Here's his response:
We've found out what's up and we are going to release a fixed version, although we're taking Scaffolding in a new direction with VS2013 we still want this to work. Thanks for finding this bug.
So I'd keep eyes peeled for a new release of MvcScaffold that will hopefully resolve this. In the mean time, there are new features for VS2013 that take scaffolding in a much-improved direction, so you may want to investigate those.
Edit: There's a new package available (make sure to run VS2013 as admin to get it to work):
Install-Package MvcScaffolding -Version 1.0.8-vs2013 -Pre
I came across this same bug in VS2015. I pulled the source, fixed the bugs, and uploaded new NuGet packages with linked dependencies. The 3 new packages are:
MvcScaffolding.VS2015
T4Scaffolding.VS2015
T4Scaffolding.Core.VS2015
If you simply install the MvcScaffolding package, the other packages will be pulled through. Hope this helps someone else.
Cheers.
I found that I had to go into my .\packages folder (for the solution) and manually delete all MvcScaffolding and T4Scaffolding package folders (I have the NuGet "restore packages" feature enabled that, I thought, would take care to restore anything that I should not have deleted, plus I made a backup).
After that, antinescience's Install-Package command for vs2013 worked fine, and so did the "Scaffold Controller ..." to scaffold an MVC5 controller.
Just a quick update, back on time when I wrote this question Visual Studio 2013 was still in Release Candidate. Now, 8 months later, Microsoft has just released Visual Studio 2013 Update 2 and since then everything is working well with MVCScaffolding.
I've test it in Windows 8 and 7. In Windows 7 it was necessary to install
Windows Management Framework 4.0 before.

What makes deployment successful for some users and unsuccessful for others?

I am trying to deploy a Visual C++ application (developed with Microsoft Visual Studio 2008) using a Setup and Deployment Project. After installation, users on some target computers get the following error message after launching the application executable: “This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem.” Another user after installation could run the application properly. I cannot find the root cause of this problem, despite spending several hours on the Visual Studio help files and online forums (most postings date back to 2006). Does anyone at Stack Overflow have a suggestion? Thanks in advance. Additional details appear below.
The application uses FLTK 1.1.9 for a GUI library, as well as some Boost 1.39 libraries (regex, lexical_cast, date_time, math).
I made sure I am trying to deploy the release version (not the debug version) of the application. The Runtime library in the Code Generation settings is Multi-threaded DLL (/MD).
The dependency walker of myapp.exe lists the following DLLs: wsock32.dll, comctl32.dll, kernel32.dll, user32.dll, gdi32.dll, shell32.dll, ole32.dll, mvcp90.dll, msvcr90.dll.
In the Setup and Deployment Project, I add the following DLLs to the File System on Target Machine: fltkdlld.dll, and a folder named Microsoft.VC90.CRT with msvcm90.dll, msvcp90.dll, mcvcr90.dll and Microsoft.VC90.CRT.manifest.
The installation process on the target computers getting the error message requires having the .Net Framework 3.5 installed first.
Any suggestion? Thanks in advance!
Add the Visual C++ Redistributable to your Deployment project and be sure to run Setup.exe instead of the MSI when installing. This will invoke the VCRedist bootstrapper to ensure your PC has those pieces before installing your app.
Dependency Walker only shows static (link time) dependencies - it cannot possibly know about dynamic dependencies such as COM objects.
I had a similar problem after the ATL security updates last year. My app needed a later version of the C++ runtime libraries than the deployment project included.
Try running Windows Update on the target machines after installation, or download and install the latest (28 July 2009) C++ redistributable package directly.
http://support.microsoft.com/?kbid=973551
That solved the problem for me. I haven't fixed the deployment project yet though.

TortoiseSVN side-by-side configuration is incorrect

After upgrading to the latest version of TortoiseSVN (1.5.2.13595), it's context menu is no longer available.
When attempting to run it manually, I get this error:
The application has failed to start because its side-by-side configuration is incorrect.
Please see the application event log for more detail
The application log shows this
Activation context generation failed for "C:\Program Files\TortoiseSVN\bin\TortoiseSVN.dll".
Dependent Assembly Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.30411.0" could not be found.
Please use sxstrace.exe for detailed diagnosis.
I remembered I'd seen this thing before just after posting to SO
It seems that later versions of TortoiseSVN are built with Visual Studio 2008 SP1 (hence the 9.0.30411.0 build number)
Installing the VC2008 SP1 Redistributable fixes it
Confirmed working on windows 7 x64.

Resources