Recently I downloaded the Visual Studio 2019 Preview. When I run a c# program a program called dotnet.exe runs instead . The problem is that in the old visual studio when you ran it would compile it and open the program that it just compiled. When I tried to use the old Visual Studio I had the same problem. I want a stand alone .exe compiled like how the old vs did. how do i do that?
The shortest answer is to create a .NET Framework project, not a .NET Core project. That will be the same as the projects you are familiar with.
Related
In Visual Studio I perform the following steps to create a new C# project
Create New Project
Console App (.Net Core) C#
The project is created with a valid Hello World C# file. But the Debug option is disable (greyed out).
Presumably this is related to the fact that '0 Projects' is displayed alongside the project in Solution Explorer.
I have tried reinstalling Visual Studio but this did not help
No error messages were displayed.
I am using Microsoft.NETCore.App 3.0.0
The Visual Studio version is 16.3.1 - I did a clean install today
Screen shot showing problem
I don't have MS Visual Studio installed and can't install it due to financial/legal reasons. I've inherited an executable file built with Visual Studio using C#. It isn't working as planned. I can fix the problem by changing 1 line of code. I have done so, but now I don't know how to re-build the project into an executable without Visual Studio.
I've tried running the following code from the command prompt:
>C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /t:exe
/out:exchange.exe exchange.csproj
Am I on the right track?
Edit: This question is different from this question because here I ask about building and compiling a whole project... not just a .cs file.
I would suggest installing Visual Studio Community edition (free)
But, if you just want to build using msbuild through the commandline the simplest way would be (assuming you navigated to where msbuild is or have the env path set):
msbuild "C:\Users\Something\Documents\Visual Studio 2015\Blah path\Hello.csproj"
Building (then running) a simple console app that prints hello with the above:
You can use MonoDevelop for compiling your C# project.
Hi I'm doing some C# codes in my VS 2013 at my own pc but it doesn't work on our school's pc because the version of the Visual Studio there is very outdated , it was only 2008.
And I cant run my code that I've been working in 2008 that was made in 2013.
So How can i run it? Should I download VS 2008 ?
thank you
It is probably the Project and solution files that are causing you problems, as these change from version to version. C# itself though hasn't changed so much.
You could perhaps consider just copying the c-sharp files between the computers.
ie, have a skeleton solution in each version and copy and past the CS files, or the text from the files into the projects.
Bear in mind that Visual Studio 2008 is going to target .Net Framework 3.5, so just avoid using any later framework functionality (which shouldn't be too hard).
A while ago I created a Visual Studio Package/Add-In for Visual Studio 2010 (for those curious: http://visualstudiogallery.msdn.microsoft.com/ea23f9a7-a942-45b2-87e6-5df6ff0444ff). If I try to download that and install it in Visual Studio 2012, it doesn't work, I get a version error.
So my first thought was to see what happens if I try to port it to 2012. I downloaded and installed the VS2012 RC SDK, and basically recreated the whole thing in a separate solution and it all works. What I noticed was that many of the assemblies I had to reference (Microsoft.VisualStudio.*) were now version 11 as opposed to version 10 (for obvious reasons). After copying and pasting all the code over, I got it to work correctly in Visual Studio 2012.
My question now is this: Is it possible to have one .vsix file for multiple versions of Visual Studio (I'm guessing no.) If not, what's the correct approach to take as far as uploading the different versions? Can I upload two versions of a .vsix? Will the Add-In manager in visual studio pick the correct one automatically? Do I need to create a new package e.g. "Visual Pastie 2012"? Just looking for some guidance.
Rename the VSIX package to give it a ZIP extension and open it up. You'll find a file called extension.vsixmanifest. Inside this XML file you'll find an element called SupportedProducts which should look like the following to work in VS2012.
<SupportedProducts>
<VisualStudio Version="11.0">
<Edition>Pro</Edition>
</VisualStudio>
</SupportedProducts>
HTH
I wrote a visual c# 2008 windows form application ,then i edited the code in a computer which had visual studio 2010,but i can no longer run it in visual 2008,is there a way i can do this?
When you say "can no longer run it"... what happens?
the sln files are not compatible; you'll need different sln files for each VS version
the csproj are mostly compatible, although you might see a "version 4 not recognised, using 3.5 instead" warning or two, which is usually fine
the cs is compatible as long as you don't use dynamic or the other new language features
In most cases you can get away with just having a separate sln for VS2010. So just rename it to "Whatever_2010.sln", get your old "Whatever.sln" back from your source repository, and rename it to "Whatever_2008.sln".
http://stevedunns.blogspot.com/2010/02/tool-to-switch-project-files-between.html