I'm getting started with Visual Studio 2010 Express. A simple "Hello world" program (with a window and a command button) is being compiled with .net assembles, so it will require a .net to run.
Is there a way to set up Visual Studio to compile the code natively without using .net dependencies? Just a plain executable without .net dependencies.
If you're creating a .Net application, you're going to need the .Net Framework to run the program. If you don't want to use the .Net Framework then you are creating the wrong type of application. If you're trying to create a C++ application, you need to use the C++ templates.
Related
We're developing a SQL Database project in Visual Studio 2022 that will be loaded into SQL Server 2017 as a CLR assembly. In the same Visual Studio solution we have a .NET Core 3.1 class library project. We would like to call another, common, class library project in the solution from both these two projects.
I see SQL Server 2017 supports CLR version 4.0, which is equivalent to .NET Framework 4.x. So we decided to use .NET Framework 4.7.2 for the SQL Database project.
As the common class library is referenced from this .NET Framework 4.7.2 project and also from the .NET Core 3.1 project it needs to be .NET Standard 2.0.
I set up the references from the Database project and the .NET Core 3.1 class library project to the common .NET Standard class library project and everything seemed to work. The solution compiled without error.
However, after closing the solution and reopening it Visual Studio 2022 hangs. I can see messages saying that it has loaded each of the projects. A message then appears saying "Preparing Solution..." and it seems to get stuck there indefinitely. I've tried waiting about 10 minutes and it never gets past that message.
I tried upgrading Visual Studio 2022 from v17.3.3 to v17.3.5 but that didn't make any difference. I've also tried opening the solution with Visual Studio 2019 and 2017 but they have the same problem.
Does anyone have any suggestions for fixing this issue?
How can I make the C# interactive console inside Visual Studio use .NET Core instead of .NET Framework?
By default when it starts it shows that it is using .NET Framework in parenthesis in the title bar.
In Visual Studio 2019 16.8.3 (and probably in earlier versions, but I don't know how much earlier) you can execute:
#reset core
This resets the C# interactive console and makes it use .NET Core.
I installed Visual Studio 2017 version 15.6.5 (the latest) and now when I create a new Visual F# project under .NET Standard the only alternative is Class Library (.NET Standard). I would like to create a Console Application. How can I do that?
As sort of a hello world attempt, I am compiling a simple EXE that dynamically loads a DLL (which I have also written) using only C++ files, building with Visual Studio 2010. However, when running on a new machine, an error appears that the VS2010 runtime is not present.
Is there a way to package the runtime in my application or DLL so this doesn't occur? Without using an installer program.
Alternatively, is there a way to exclude requiring the runtime at all?
(I am using Visual Studio 2010, but this could really be of interest for all versions)
I'm pretty aware that Visual Studio 2010 works with C# 4.0. But now I was wandering if I'm able to test C# 4.0 features with Visual Studio 2008.
I did that one time, using C# 3.0 with Visual Studio 2005 hacking the app.config file.
Did anyone have any success using C# 4.0 in VS2008?
I've installed Net Framework 4.0 beta, rebooted, created a new WPF application, chosen Application properties, but the Target Framework can be set only to Net Framework 3.5.
No. You can't use .NET 4.0 with VS2008, and you can't use the C# 4.0 features either - it's exactly the same situation as trying to make VS2005 cope with C# 3.0. The editor, Intellisense etc just don't know about the new features.
One important aspect is that even though it looks like Visual Studio is just using the external csc.exe compiler, it isn't - there's another "in-process" one. That in-process compiler is tied to the version of Visual Studio it comes with, so it only knows about the language features which were available at the time.
The 3.0 and 3.5 .NET libraries were just add-ons to 2.0. So it ws possible to test work done in VS 2008 using VS 2005 if you didn't use any 3.0 or 3.5 features.
My understanding is that the 4.0 is entirely new libraries, so I doubt you will be able to load or use them in VS 2008/2005.