CLR C++ DLL project can not be opened in Visual Studio 2019 - visual-studio-2019

A couple of years ago, I wanted to add some open source C++ code to my C# project.
The C++ author, though a briliant physicist was a horrible programmer, and rewriting it into C# was proving very difficult. My solution at the time was to make a CLR DLL with the C++ code with a little extra code to convert to/from C# data types.
Problem solved. My C# program uses the CLR dll file and all is well.
Fast Forward to 2020 and I am considering upgrading from using Visual Studio 2015 to using Visual Studio 2017.
When I open the CLR DLL project I get an error:
The main .h file which was long ago created by Visual Studio and modified by me, will not even be displayed.
Has visual studio 2019 dropped support for creating and using C++ CLR DLL ?

Seems Visual Studio automatically commented out some of my include statements which I had written which contained the letters mfsk
Problem solved.

Related

How to create F# .Net Core ConsoleApp in Visual Studio 2017 RC

project.json is gone and I don't quite understand how to change compiler(language) for the project. Creating of Console Application (.Net Core) leads to actually new C# project with refreshed .csproj file with <TargetFramework>netcoreapp1.0</TargetFramework>.
How can I create F# Console Application with targeting to netcoreapp1.0 with Visual Studio 2017 RC?
The tooling for .NET Core is still in "beta" level stages (and that's being generous, even for C#), and the for F#, it's not even quite to that level.
At this point (just post first RC "refresh"), using the command line (dotnet new) is pretty much the best option. Each 2017 RC update is improving this situation, but the F# situation within Visual Studio tooling is not to the level of working like normal .NET projects at this point. Supposedly, this will work as expected by RTM, but it's just not there today.

Casablanca - REST C++ SDK, used in Embarcadero RAD Studio XE5

I need to do a http get in RAD Studio XE5 C++. The tutorials on the RAD Studio site discuss a RESTCLient that is not included with the version I have. I found the Casablanca project, which is specifically for Visual Studio, and I made a small program in VS that does the simple http get and handles response in the way I need.
What do I need to do to successfully use Casablanca from within RAD Studio?
There are the steps I have taken so far.
Compiled Casablanca in Visual Studio 2013
Copied the .lib and .dll over to a folder in the RAD Studio project
added that folder to the link path in the RAD Studio project
added the .lib to the project
added dll imports to classes that should be in the .lib to the .cpp I want to use the function in.
class __declspec(dllimport) http_client;
class __declspec(dllimport) filestream;
class __declspec(dllimport) producerconsumerstream;
class __declspec(dllimport) rawptrstream;
There was a OMF error, and I used a tool that came with RAD Studio to convert the .lib, that got past the error.
I don't know how to declare the dll prototype's of the functions, because the returns types are from a namespace in the library itself so they aren't recognized. http_client is an unrecognized structure.
I tried this as well without the class keyword.
DLLs that export classes are not portable across compilers. So you will not be able to use a Visual Studio compiled DLL in C++Builder if it exports classes. Either flatten the DLL interface to export plain C-style functions instead (and then use C++Builder's command-line IMPLIB tool to create an import .lib file for the DLL, do not use the .lib file created by Visual Studio), or else find another solution.
For instance, C++Builder (and Delphi) ships with Indy 10, which has a TIdHTTP component. You can use its TIdHTTP::Get() method to perform an HTTP GET request. But if you need to actually use REST, you might be better off simply upgrading your XE5 to a version that has TRESTClient available (BTW, Embarcadero's REST classes use Indy internally).

Can I open my Delphi 2007 project in Visual Studio (or other IDEs)?

I have a big Delphi 2007 project, and the Delphi IDE is slow and unstable even I install DelphiSpeedUP, FixIDE Pack.
The IDE freezes for a few seconds when first loading the project (300K lines of code). The Type Library Editor is very inefficient when I want to add a new method/property because it has around 1000 APIs and it kinda freezes for ten seconds in the Type Library Editor.
But the Delphi Compiler is good and I am happy with that, just the IDE has many issues. The Visual Studio 2010/2012 is very good and stable.
Just wondering if it is possible to code in Delphi in the Visual Studio, a basic syntax highlighting, debugger is OK.
It is not possible.
Visual Studio not work with pascal lang.
You can use np++ for simple syntax highlighting and compile with command lines in DCC32.exe.
and the docs in here.
and for Debug use ollydb.
and I'll not suggest it.
and I think the likely pascal IDE to Delphi is Lazarus but it can't compile your Delphi source code directly.
and I'll not suggest it too.
I think use the Delphi with fix and speedup patches.

Where can I get the F# Compiler and FSI v4.0?

I know I can download the "April CTP" to get F# 2.0 for .NET 2.0. But I need FSC and F# Interactive for .NET 4.0. On a machine with VS 2010 installed, it ends up in C:\Program Files (x86)\Microsoft F#\v4.0. Is there a redistributable for this?
If you installed Visual Studio 11 Beta or Visual Studio 2012, I recommend you check the following path, where you will find Fsi.exe and Fsc.exe.
C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0
Others have provided good answers; I'll summarize and add one more bit (2nd bullet):
We don't have any polished story here yet. We're working on one.
In the case of the compiler, you may be able to get by with the fsc.exe in the April CTP (it is capable of referencing .NET 4.0 assemblies and building .NET 4.0 assemblies, even though the compiler itself runs on 2.0). (Note that for building project files, you might also need the right Microsoft.FSharp.targets imported; I haven't worked all that through...)
If you were to copy the right assemblies and targets files from a VS2010 install to another machine, that would work, but offhand I don't know if that violates the VS license.
The existing downloadable "redist" does only contain FSharp.Core.dll.
(possibly see also this for a similar discussion but no extra info, as well as this Connect request)
The redistributable, for the F# runtime, is available at the following link, but unfortunately doesn't include the compiler or F# interactive:
http://www.microsoft.com/downloads/details.aspx?FamilyID=5f0a79f8-925f-4297-9ae2-86e2fdcff33c&displaylang=en
If you already have VS2010 installed on the machine there shouldn't be no need to install it, as the compiler, fsi, and F# runtime will be installed with VS. It should be just a matter of adding the directory containing the compiler to the path, so the shell can find it (if you want to use the compiler/fsc from the command-line).
This is an old question, but I came across it and thought that I'd add an update for people who find it through Google:
The current version of the F# CTP (April 2011) includes both .NET 2.0 and .NET 4.0 binaries, including FSI.exe. On my install...
.NET 2 = C:\Program Files (x86)\FSharp-2.0.0.0\bin\
.NET 4 = C:\Program Files (x86)\FSharp-2.0.0.0\v4.0\bin\
I think that there is no standalone installation of F# for .NET 4.0 (similar to the standalone installation for .NET 2.0). The reason probably is that F# for .NET 4.0 is simply meant to be distributed only as part of Visual Studio 2010 and not separately (just like other core Visual Studio languages).
If you need to use fsi.exe and fsc.exe for .NET 4.0 on a machine that doesn't have Visual Studio installed, you'll probably need to copy them together with the referenced libraries. This shouldn't be that difficult - you only need assemblies from "C:\Program Files (x86)\Microsoft F#\v4.0" together with FSharp.Core.dll (which should be added to the GAC) and (I think) also ISymWrapper.dll (but I'm not quite sure where this is located).

migrate a asp.net mvc solution file from 2010 back to 2008

i did an upgrade and it caused lots of problems. unfortunately i didn't back it up. Is there anyway i can convert a 2010 solution file back into asp.net mvc 2008?
Make a backup of what's left of what you currently have before doing this ...
Create a new solution in Visual Studio 2008. Create new projects for the 2008 solution. Use the project menu or right-click the project and choose "Add Existing Items..." Choose all the code files .cs .vb, etc from your 2010 structure and include them in the 2008 structure.
Basically you're copying all the code back into a 2008 structure with the 2008 formatted project and solution files. The code shouldn't be substantially changed beyond repair. You might have to manually address some issues in the converted code but once you know what they are it will be a repetitive process more than anything.
If you are writing code of any importance you should be using a version control system like as SVN. I haven't tried Visual Studio 2010 yet, but can tell you from experience that the differences between 2005 and 2008 are laughably small. You can down convert a 2008 solution file by manually changing the first two lines from:
Microsoft Visual Studio Solution File, Format Version 10.00
Visual Studio 2008
to
Microsoft Visual Studio Solution File, Format Version 9.00
Visual Studio 2005
the project files are fairly trivial as well with the product tag changing from:
9.0.21022
to
8.0.50727
Please note the changes I have listed for project files may not be 100% accurate and I have not tested for differences between service pack releases. However, creating a new project in an earlier version of Visual studio, making a copy and then doing an upgrade should allow you to run a diff and provide a better answer than what is currently accepted.

Resources