Visual Studio C++ project on another PC fails to build - c#

Tested with the following setup:
Home - VS2017 or VS2019
Classroom - VS2013 or VS2015.
I do code at home, then copy to my flash drive, bring it to the classroom and open a project from their PCs. Upon compilation I receive a big list of errors accessing standard header files, similar to this. Happens to me with every project I create at home, and the other way around: from the classroom to home PC.
This is something that doesn't happen with C# projects, which only ask me to change the .net framework version before opening, everything works fine here.

If you created a project in VS2013 and try to open it in VS2017 or VS2019 you might need additional changes.
Check this out- https://learn.microsoft.com/en-us/visualstudio/porting/port-migrate-and-upgrade-visual-studio-projects?view=vs-2019
If you created a project in the latest version say VS2019, it is very difficult to open it in older versions such as VS2013.

To fix it set the Omnipath to latest in vscode settings

Related

Intellisense working for one project but not for another on same machine

I have a Unity project on my laptop where intellisense and autocompletion works just fine with visual studio code (mac os system).
Now, i created a brand new project (same Unity version as the old one) and for that project intellisense is not working :O Same machine, same editor, everything else is the same.
Any suggestions on what could fix that since the required dependencies are already installed (the visual studio code output is not giving me any logs or other messages by the way) ?
From omnisharp's announcements
If you still need Unity or .NET Framework support, you can set omnisharp.useModernNet to false in your VS Code settings and restart OmniSharp. Please see the Requirements section above to ensure necessary tooling is installed.
So we just need to uncheck Omnisharp: Use Modern Net in vscode settings, and beware of the settings precedence.

Visual Studio 2017 MVC does not contain all source folders

I have an issue with the new Visual Studio 2017 when starting a new ASP.NET MVC project. Recently I started a course on Udemy:
https://www.udemy.com/the-complete-aspnet-mvc-5-course/learn/v4/content
In this course I obviously try to mimic the teacher as perfectly as possible. However, I bought a new laptop yesterday and installed VS2017 on it (apparently you cannot get VS2015 as easily anymore). I followed the same steps as with VS2015 on my previous laptop, but it seems that the files generated by VS2017 are less than those generated by VS2015. Two of the files I'm missing are:
Startup.cs
Models/IdentityModels.cs
And there are several more missing, for instance regarding the Account Managing. The files in VS2017 look like this:
VS2017 MVC generated files
Unfortunately I don't have a snippet of the VS2015 version, since I already reset my old laptop to factory settings.
Are there others with the same issue, or is this standard since VS2017? Right now I can just look at what the teacher does, but later on he will introduce logging in and authentication, at which point I assume I will need that Account Manager .cs file.
Any help is appreciated.
Thanks to itsme86 and Jasen I found the "issue". Just needed to put the authentication model to "Individual user accounts" when creating the project. Stupid error from my side.

One or more project was not loaded properly

After copying the project to another laptop/ PC, when I want to open the solution, VS2010 shows the error "One or more project was not loaded properly". I have tried running visual studio in admin mode but that did not solve the problem.
This is usually a result of an inconsistency in your solution or projects. Open the solution file in an external editor (such as notepad) and check that the path it has to the projects is available and did not change. There shouldn't be any absolute paths in the solution file.
Maybe because the project from where you copied was configured with IIS configurations and you are trying to run the project in visual studio's default environment.
you have to right click on your project and set as a start up project after that you have run your project,
I seem to have found unloaded project, after noticing there's one missing by manually counting and comparing it to the number of projects the solution explorer reported. It was deep inside another folder in the solution explorer that I never used and assumed that had nothing worthwhile.
It's a familiar issue. Looks like the project you are trying to open was created in higher version than what you have. If the project is in MVC, make sure you have installed MVC OR Make sure you have appropriate version of .NET installed in your system.
I work with NopCommerce and a couple of times I downloaded new version and got same error message. It goes away once I install the dependencies.
Because you tagged it ASP.NET make sure you have all the ASP.NET components installed. Those are not part of .net framework but might be necessary in your project.

Git not publishing all files in a c# Project of VS2012

I'm new at using Git, and I have a problem while publishing a VS Project into GitHub.
Well, what I did was, first creating a GitHub account, then I installed Update 3 to VS 2012, and then installed Visual Studio Tools for Git so I can integrate Git with VS.
Then after that, I created a project in VS, it was a solution with 3 class libraries projects and one wpf project, everything in C#. After that I right clicked on my solution and chose commit, and then published it into a repository I created on my GitHub account.
It was supposedly published at GitHub, but when I decided to clone it locally to another computer, and after entering the project, it showed up a message saying that 2 projects of the solution couldn't been loaded.
Then I made another test, but instead of making it in C# I choose VB, I did the same steps, but this time it was published correctly into GitHub.
Why is it giving me problems only with C#?

Visual Studio 2010 going crazy with silverlight projects

I tried to create a new Silverlight project in Visual Studio 2010 (Ultimate version) for the first time.
It told me I got to install the latest version of Silverlight, before creating any.
You need to install the latest silverlight developer runtime before creating a silverlight project
I clicked the link on the message, download and install whatever was there.
Then when I tried to create a new project, it told me I got to install "Silverlight 3 sdk".
I removed the new version, and installed Silverlight 3 sdk.
Then again, when I tried to create a new project I recived the error stating I must install the latest version.
It went like this a bit more, then after searching on the internet, I removed everything from my computer with "Silverlight" in it's name, installed Visual Studio SP 1, reinstalled Silverlight 5 (this time I paid attention to install x64 version, since it turns out that in the error message Microsoft supplied a link to x86 version, no matter what OS you are running).
I managed to create a new project, and everything was fine.
Then I downloaded some Silverlight.FX samples (probably for version 3).
They weren't open properly (which was a downer by itself), and then I recieved again a message tells me I must istall the newest version.
I closed Visual Studio, tried to create a new project, and got again the same message.
It seems the problem reappeared just because I opened an old project.
Does it make sense? Why my Visual Studio is so unstable? What should I do?
Your silverlight plugin version, silverlight sdk and silverlight developer tools version should be same version. Please check this.

Categories