Visual Studio 2010 Pro: Error when creating project - c#

For whatever reason this error comes up when making a project, even though this is an error I expect to see at runtime or when there is a null variable. All that visual studio creates in the project solution is a reference folder.
I've installed Visual Studio 2010 Pro from an Image file on a disk and I've reinstalled/repaired both VS and the Service Pack 1.
Is this just a known error? Should I be concerned about running the program correctly? It is especially important that I have all the libraries/content folders since I'm going to be using XNA to develop an Xbox game.
Sorry can't post pictures yet.
A problem was encountered creating the subproject "WindowsGame1". Object reference not set to an instance of an object.

Found the error, which is somewhat along the lines of reinstall/repair.
Basically, I have windows phone sdk installed and I repaired it, somehow fixing my xbox/windows games.
Thanks for leading me to other solutions though, if anyone still has this problem I'd recommend reinstalling/repairing visual studio, sdk, frameworks 4.5, etc. the problem is bound to be an installation error.
Plus, I had to uninstall old 2008 or stand-alone visual c#, c++ IDEs.

Related

Visual Studio Code Won't auto complete my C# code

SOLVED
Just to clarify this is about VS code not just VS
I've had the worst 3 hours looking for anything that could possibly fix my Visual studio code. I'm using the program to develop a game on unity but I can't seem to get the auto complete thing (I think its Intellisense) to auto complete my code causing spelling mistakes and making coding 10x longer than it needs to take.
Heres a list of things I have tried:
Install .Net Framework v4.7.1 (which is what the console says to do)
Fix the Assembly file made by unity multiple time
Reinstall Visual studio, C# plugin and .Netframework
Change the OmniSharp to the latest version
I will add that when ever I type anything it comes up with "[info]: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionService Could not find document for file c:\Users\Bruhman\Grinder\Assets\Scripts\PlayerMovement.cs"
and when I open visual studios and write anything in the script it'll come up with an error that states "Some Projects have trouble loading. "Source: C# (Extension)" "
Below is a screen shot of what comes up in the console (It's the same every time)
Console
Never Mind I found out the issue, apparently I need to install Visual Studios Community version and then the .Net developer packs from visual studios and not just online, I'm assuming that it doesn't get detected or something when installed through the exe file...
I don't really know much, but I use it every day : have you tried the unity tools extension ?
It features a lot and also the c# auto completion.
If it still bugs, have you installed the .Net for the EXACT version. I also struggled because I had the upper version and not the exact.
Finally is it linked with unity (I don't know if it could interfere if not done)
Sorry I don't know anything else if this don't work.

Unable to run a MonoGame project on a clean installation of Visual Studio and MonoGame

I recently got a new computer, and finally got around to installing MonoGame, as I worked with it a few months back on my old computer, and primarily use Unity for my game development when not working on 2D games. Their website says they have CLI templates that work with Rider, but I figured it would be best to get it installed with Visual Studio first. Following the exact steps listed on the MonoGame website, I got everything installed that I needed, and started a project from one of the Visual Studio MonoGame templates. Upon opening the project, and everything finishing loading, I am greeted to this miserable sight. I also had an error in the console relating to MonoGame, with the error code MSB3073. From what research I did, I found that it either had to do with my username having a space in it (it clearly does not, so that was out of the picture), or it had to do with using the Visual Studio templates, and I would simply need to create the project from the CLI templates, as seen here. However, creating a new project from the CLI templates does not change anything. I have tried uninstalling and reinstalling dotnet, I have tried uninstalling and reinstalling Visual Studio. I have, of course, powered my computer off and back on multiple times. Even trying to open the project in Rider after installing the proper MonoGame packages in the program has the same exact errors. But when I zipped the project up and sent it to a friend who works with MonoGame, he was able to run the project with no issues, so clearly it has something to do with my setup.
I have also cleaned my nuget cache, cleared my project temp folders, and cleared the visual studio cache. Eventually, the Microsoft dependencies stop having issues when I simply close and open the project again, but every time I open the project in Visual Studio, I get the same error in the console, and it prevents me from running/building the project.
Hoping someone on here will know what to do with the info I've given, as I'm completely out of ideas!
So I figured it out. I'm not very experienced with the command line, but I managed to find a very nice tutorial by someone who wanted to make games with MonoGame using only the command line. In it, I was able to attempt to build the project from the CLI, and it gave me an error message unlike what was in Visual Studio. It said that MonoGame only works on a 64bit OS, but I'm on a 64bit OS. So I went to look at what version of dotnet was being used, and sure enough, it was the 32 bit version! It took a while to figure out how to uninstall it, and how to use the dotnet-core-uninstaller tool in the command line. Then all I had to do was remove the Environment Variable in the System category for the Path variable that referenced the Program Files (x86) directory of dotnet.
Hopefully if anybody else comes across this issue, they'll find this post, as none of the others seemed to fully explain how to do anything that needed to be done to fix the problem :)

How to successfully move a Visual studio project to a new PC

Returning to Visual studio after a few years away and really stuck with this one.
I inherited an Excel addin project for calling rest services that needs a few tweaks. No problem with code. It uses the NetOffice component which seems quite useful for handling COM interop.
It was on a windows 8 machine 32 bit visual studio 2013 community. I am on windows 10 64 bit Visual studio 2015 community fresh install.
I tried copying all the project files to my PC, open solution file and go:
Just once, the first time, it ran and paused on my breakpoint, but never after that. it still runs on other persons pC- not too big a surprise.
It even complained after the build that did not have permission to unregister the dll from (the old PC)
A text search of the project for the old PC name found nothing.
Edited all references and paths in properties file. Opened solution and project files in notepad and satisfied that nothing now points to previous machine.
It builds again but fails to stop on breakpoints. Then it complains that it can't find the login properties in the login file on (you guessed- the old PC)
I tried building a new project from existing files. That seemed to go well, but it failed to add references and I can't even find the references via add reference dialogue, Most peculiar it complains that a sub namespace of system does not exist. I tried different target .net frameworks without any luck and gave up on this approach.
I suspect part of the problem might be connected to my using 2015 community edition and the template might not be installed that was originally used ti build it.I used a class library when I attempted to build a new project manually.
Is there a safe procedure for inheriting a project like this and getting it set up cleanly on a new PC?
I realise this is a fairly dumb newbie question, but I am really stuck now.
Thanks in advance
If you will use same version of Visual Studio on destination PC than you can just copy/paste your project to the destination PC... but as chandler mentioned the best way to to that is to use some kind of source control like GIT or TFS (Team Foundation Server), with source control method it will be less painful for you to accomplish that movement of projects.
And if you choose the Team Foundation Server you have unlimited number of free repositories as long you are a small team up to five members.
Please see pricing models and additional information here: Visual Studio Team Services Pricing

Visual Studio 2015 - Can't create Windows 10 app packages for the Windows Store

Since I installed Visual Studio 2015 Update 2 I can't create any app packages for the Windows Store anymore. The apps are linked to the store and compile without any mistakes, however every time I try to create a store package it fails because "C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\Tools\nutc_driver.exe" returns exit code -1073740791. I've already tried both repairing and reinstalling Visual Studio, I've also reinstalled every single Windows 10 SDK package (10240 as well as 10586.212), but none of these attempts fixed my problem. It doesn't even work with a completely new, empty project.
The weird thing is that I can create packages not linked to the store without any problems, the problem only occurs when I try to create the actual store packages.
I'm running the latest stable release of Windows 10 Pro x64 (10586.212) and never tried the Preview SDK or other sorts of pre-release things with these packages. Also, they're all located on my main partition (C:).
The next thing I'd do is to reinstall Windows 10, however that can't be the only option to fix this issue (supposing it would do). So is there anybody who knows what exactly causes Visual Studio to fail at this point?
Thanks!
Edit: The error is also specified as "ILT0005".
So I've figured out what had caused Visual Studio to fail. Believe it or not - the display language of Visual Studio was the problem. I changed the language from German into English and everything worked just fine afterwards.
However, thanks anyway. And maybe I can reach and help some other people who are struggling with the same bug.

Why does debugging a C# project display C++/CLI symbols?

I've got a strange problem with some C# library and console projects (but not ones I create from scratch) where they are displaying the watches and the smart tags for debugging using C++/CLI notation (for example, showing System::Object^ where I would expect System.Object):
I've tried changing the project guids, as I thought this was the problem (and some had changed), deleting obj/debug folders, restarting Visual Studio 2010, repairing Visual Studio 2010 and even the old favourite restarting Windows.
Is there any obvious setting I'm missing that has somehow been enabled?
I ran into this issue as well, the debugger picked up c# and c++ in all c# projects. I'm running windows 7 64 bit.
I resolved this issue by going to the compatibility tab of the properties of the shortcut. It was checked as running as windows xp service pack 3. I unchecked that and still kept run as administrator checked. Suddenly my debugger picked all of it up as c# again.
As this link in the comment provides an answer from Microsoft - "Cannot reproduce" I had to uninstall Visual Studio 2010 and re-install it (in fact I re-imaged my machine).
Switching off the "HEX" option shown here did turn off hex addresses, but not the C++/CLI display.

Categories

Resources