The parameter is incorrect - visual-studio-2012

When I try to add a service reference to my project in Visual Studio I keep getting the error " The parameter is incorrect" I know it's not the code because it doesn't happen on my coworkers computer. I have uninstalled and reinstalled Visual Studio to see if the problem is with my installation. But that doesnt seem to fix it.
I am using visual Studio 2012.
Did anyone come across this issue before? Please help!

I had this problem with a project that was copied out of ClearCase. the .csproj file still had the reference telling visual studio that its still under CC. I removed the following references and it worked.
<SccProjectName>Rational ClearCase</SccProjectName>
<SccLocalPath>Rational ClearCase</SccLocalPath>
<SccAuxPath>Rational ClearCase</SccAuxPath>
<SccProvider>Rational ClearCase</SccProvider>

I had the same issue after updating SQLite plugin for windows phone.
It seems like the sqlite-net-wp8 project (which is a wrapper to work with the plugin) had some import method from that plugin and when the version changed the wrapper didn't work anymore.
The solution was to downgrade the sqlite plugin to a version that is compatible with the wp8 wrapper.
Edit: The wrapper had an update so I've upgraded both the plugin and wrapper and now the issue is fixed.
If it shows any project in your solution with "(failed)" next to it's name try to remove it and re-add it to your solution and it will tell you what the issue exactly is.

In addition to Frisons answer - the issue works aswell the other way round:
If you are using ClearCase, make sure that the entries mentioned by Frison are available in your project file. I just had this case that one of the projects in my solution did not (however) had these entries and i got the very same error. Adding these lines fixed this issue for me.

I got the same error for WindowsPhone project, after make a clear manifest the error disappeared.

Related

monogame system reference not found

I just installed the monogame (v3.7), created a new project (in VS2017) for windows, tried to run it, and this error popped up:
I can't add even System reference manualy, and I cant find the answer to this anywhere. Anyone know what is going on here?
I just noticed what happened. I didn't have any target framework set for this project for some odd reason. So instead of deleting this question, I hope this answer helps.
To fix this, go to solution explorer, right cilck your project, proerties, in Application tab select the Target framework.
I selected the latest I had (.NET Framework 4.6.1). I will make a guess that the latest one should work fine

Project is targeting frameworks not installed or are included as part of future updates to Visual Studio

I am attempting to convert the Microsoft.Health C# class library that is installed as part of the HealthVault SDK, using instructions provided here. After following these instructions, I get the following error when attempting to load the project into Visual Studio 2013.
"The project is targeting frameworks hat are either not installed or
are included as part of future updates to Visual Studio. See
http://go.microsoft.com/fwlink/?LinkId=287985"
Visiting the link takes me to .NET SDKs and Downloads. Once there, I have no clue on what needs to be done.
I do realize that one will have to leverage the Portable Class Library Contrib project to fill in some missing bits, especially code related to System.Security. This, I will deal with later.
Any one run into a similar problem?
Maybe so late but for those who have the same problem.
I had the same error in a project which was working perfect before updating VS2013 and finally after 3 hours looking for the source of the error I found that the error is about TargetFrameworkProfile.
In my case I sloved it like so:
Right click in the unloaded project in your solution and click Edit.
Find the TargetFrameworkProfile tag and set it as below:
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
At a guess, this is because you need to specify the TargetFrameworkVersion and TargetFrameworkProfile properties in the project file. Compare the .csproj you are trying to create to a newly created PCL project file, and make sure that everything that's not specific to your project matches.
I ran into the same issue and got it resolved by installing the latest Visual Studio Update

All MSTest Tests being ignored

I have a visual studio 2013 with resharper 8.1 installed.
Out of nowhere all the unittests started being ignored, with no stack message at all.
I´ve already, restarted VS, PC, and even uninstalled resharper.
Any thoughts?
Is there any log file available that could, at least, give me an extra hint?
TKS
The problem turned out to be a duplicated file in a deployment folder. Don´t know how windows let 2 files with the same name at the same folder, but they were there.
My problem with the same symptoms has been solved by updating NUnit project dependency NuGet package up to last stable version. (May be just reinstalling could solve the problem)
Had similar issue. Was caused by multiple MSTest versions in the same solution.

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.

"Object reference not set to an instance of an object" when building my cloud project

When I build my solution with a bunch of cloud projects, I see one or more "Error: Object reference not set to an instance of an object" messages in the output. When I try to run one of the cloud projects, I get the popup "There were build errors. Do you want to continue and run the last successful build", but there are no errors in the Error List and the same "Error: Object ref..." errors in the output.
When I click package on my cloud project I get a messagebox with "Object reference not set to an instance of an object", also when I right click -> properties on the project reference under "Roles" in the cloud project.
If I use the command line to build my solution with msbuild, I don't get the error.
I tried restarting Visual Studio as well as my PC. I also tried reinstalling Azure Tools (2.1) and then Visual Studio.
My colleague is now getting the same problem on Visual Studio 2013 RC.
Has anyone had the same problem?
I've searched, but only found people with problems when publishing, where the solution is to package manually.
I had the same problem. Right click on the cloud service project, unload the project. Reload it again.
Try removing the role from the cloud project, re-build solution (if there are errors please post them), then add the role back into the cloud project and re-build.
I had a similar issue when a publish exited out and I started receiving the 'Object not found' error. VS2013 (in my case) was reporting that 'diagnostics.wadcfg' was missing and had unusually stored this into a different directory.
By going into the project file (.ccproj) and removing the erroneous entry from the 'Project\ItemGroup\Content Include "\diagnostics.wadcfg" and reloading the project - everything kicked back into life.
Failing that, check a working project file against the offending project file for inconsistencies.
You don't have to remove your roles and add them back in again, which is really annoying because you have to preserve the contents of your cscfg and csdef files. Instead, close Visual Studio, delete the solution's .suo file and open the solution back up again.
I wanted to let everyone know I was dealing with a very similar situation, albeit with a different version of the Azure SDK (1.8). I have many projects with Cloud Services that I have created built numerous times and then all of sudden could no longer open them. Attempting to open the Cloud Service configuration UI resulted in the “Object not set to a reference” error. I could open the actual XML file, but not the GUI interface.
I attempted to reinstall the 1.8 SDK and tools numerous times, as well as VS 2012 to no avail. I finally tried installing the latest SDK (2.2) and now I can open the projects. Not sure what changed in my system prior to this but glad I was finally able to open my projects again!
I also had this error when building. Projects within the solution would build independently but building the entire solution failed.
I have learnt usually these types of issues are caused by invalid azure role or configuration files. In my case it turns out a .cscfg config file rename on another branch was merged with my branch but it didn't rename the file – therefore the .ccproj file in my branch was incorrectly referring to the new name but only the old filename existing in the solution. After manually editing the .ccproj with the new filename I closed/reopened the solution and things started working.
I had a similar issue with VS2013 express after creating a view in my MVC project.
I reverted the project with git, but this did not solve the issue. I also checked the project out to a different location on my pc, but this did not solve the issue. I was able to check the project out on my laptop without seeing this issue.
In the end, I undinstalled VS2013 express and all of it's counterparts and re-installed. This solved the issue.
I had this bug (but not using a cloud project). Turns out the character encoding that Perforce (P4V) was using was wrong, it should have been UTF-8. After changing to UTF-8 and re-syncing the code, Visual Studio was able to find and compile the project just fine.
Maybe a hint: I got the same error message, when compiling VS2013 Dot42 project - realized it was caused by assigning concrete value of some inner type (in my case Enum) to INullable variable:
private SomeClass.SomeEnum? _var1;
...
_var1 = SomeClass.SomeEnum.XY; // causes compilation error
The solution was, not to use INullable:
private SomeClass.SomeEnum _var1;
None of these answer helped me. I decided to reinstall the Azure tools, and noticed that I had more than one version installed. I uninstalled the old versions, reinstalled the latest version, and this fixed it for me.
I got the same message while publishing our project too, though in Visual Studio 2010.
For me, deleting all the files from bin folder worked.

Resources