Visual Studio for Mac 2019 .NET Assemblies missing - macos-catalina

I've been writing a .NET Standard 2.1 class library project in Visual Studio for Mac 2019. However, when I was trying to add an attribute to a class, I was expecting I would be able to use quick-fix to add the reference for me. So when I was trying to do just that, it does not have the option of referencing the correct using statement. So I tried to add the assembly myself but then when I tried adding a new reference, I could only see the projects in the solution, but no .NET Assemblies. See the screenshot below.
By the way, I am running:
OSX Catalina version 10.15.3
Visual Studio for Mac 2019 Community Edition version 8.5.4 (Build 12)

.NET Standard projects do not show assemblies in the .NET Assembly tab in the References dialog.
.NET Standard projects use NuGet packages and framework targeting packs instead of the GAC so there is nothing to list in that tab.

Related

How to NOT target any .NET Framework in Visual Studio 2010 for a C++ application

Is it possible to create a new Win32 C++ project in VS2010 that wouldn't target a .NET Framework? Visual Studio seems to refuse to create a project unless at least one .NET Framework version is selected as a target. It also refuses to load a project if .NET is not installed on a computer, even if SLN / VCXPROJ files do not contain any .NET references. If .NET is not installed, Visual Studio still demands to select a .NET Framework version, but since no versions are available, it refuses to create a new project. But what if I want my application to have nothing to do with .NET and to run on a computer that doesn't have .NET installed? (The operating system I'm using is Windows XP, although that shouldn't make a difference).
I took the following steps:
Uninstall .NET.
In Visual Studio 2010, go to File -> New -> Project.
In the New Project window, under Installed Templates, click "Win32 Project -- Visual C++". At this point, Visual Studio begins to demand to choose a target .NET Framework version.
[tl;dr]   Visual Studio 2010 has the .NET Framework 4.0 as a prerequisite. The VS 2010 setup installs it if necessary, and the IDE will not function correctly if the .NET components are manually uninstalled afterwards. Unmanaged C++ applications can still be built outside the IDE without any .NET installed, and the resulting binaries have no runtime dependencies on .NET. Repairing the VS 2010 installation restores the .NET components, and gets the IDE to work as expected.
The following was tried on a clean XP SP3 (virtual) machine, with a fresh install of VS 2010.
The setup lists .NET 4.0 as a prerequisite, and installs it if necessary.
Manually uninstalling the .NET 4.0 components from Add Remove Programs breaks the IDE.
Repairing the installation gets the IDE working again. The New Project dialog has a top level .NET Framework version dropdown that defaults to .NET Framework 4, which applies to all project types. including the unmanaged C++ projects. However, the selection has no bearing on unmanaged projects, which do not target, use, or otherwise require .NET.

Failing to migrate a .NET C++ class library from VS 2008 to VS 2012

I have a C++ project that builds a .NET class library that targets the framework 3.5.
This project has been working seamlessly since ages and the classes can be used from, among others, C# applications. It was developed with Visual Studio 2008 Professional.
Now I need to migrate if to Visual Studio 2012 Professional. I have successfully converted the project.
I meet a first problem, which is that the target framework cannot be changed from the project Common Properties, the field is read-only.
I can work around this by editing the .vcxproj file to insert a TargetedFramework tag. The new version does appear in the Common Properties.
I am also able to add references to the .NET assemblies that the library needs (just System, System.Drawing and System.Windows.Forms). The class library compiles correctly to a Dll and I can see its content in the Object Browser.
Now if I try to use it in an application targeting a framework version below 4, I get the message
1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1605,5): warning MSB3258: The primary reference "MyClasses" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.
I can't see where an indirect reference could come from (my explicit references are to v2.0.50727, which seem to be the file version for 2.0/3.0/3.5).
Do you have any explanation ?
(Expanding on Hans's correct comments)
Visual Studio supports .NET multi-targeting for the C++/CLI language by launching older versions of the C++ compiler.
As a result, the language features are inextricably linked to the .NET framework dependency -- with the newer compilers (Visual C++ 2010 and later), you get C++11 and C++14 features and .NET 4, with the older compilers (Visual C++ 2008 and before) you get .NET 2, but very little C++11 support.
To control this, there's a Platform Toolset selection in the Project Properties, but some manual project file editing is also required.
The Visual C++ Team wrote a blog post about C++ Managed Multi-Targeting in Visual Studio 2010... for later versions, read the documentation on MSDN.

Installing Qt 5.5 on Windows 7

I would like to install latest version of Qt (5.5) on Windows 7 for C/C++ application development, and have a few questions:
Can I use Microsoft "Visual Studio Community" edition (2015) as the compiler?
I assume I need to install Visual studio first and then Qt?
I am going to install Qt from here, after downloading and installation do I need to build Qt? Or it is ready to go?
Is there a tutorial that explains all the required steps in details. I have done Google search and found bits and pieces here and there not not a good complete step-by-step reference.
Thanks for the help.
You need the compiler, which is integrated in visual studio. I don't think you can get the newer ones without Visual Studio (From official sources). However, you can use Qt on windows without msvc. You can build with the minGw compiler - but I personally like msvc more.
Regarding VS2015: It won't work without extra configuration. Qt 5.5 supports msvc2013 only (the next release, 5.6, will support the msvc2015 compiler). But Visual Studio 2013 will work. The order of installation doesn't matter.
After you installed Qt, all you need to do is launch Qt-Creator and start coding ;) If you wan't to use Visual Studio instead, there is a Plugin on the bottom of the download page ("Other downloads"). Visual Studio 2015 isn't supported here too, but 2013 is.

Can I use build against the 2008 VS Runtime with VS 2010 and no copy of VS 2008?

It looks like using Visual Studio 2010 it is possible to build against the 2008 runtime, if you have both editions installed: Can I use Visual Studio 2010's C++ compiler with Visual Studio 2008's C++ Runtime Library?
Is it possible to do this using just the free Windows Platform SDKs and VS 2010? Just to stress - installing Visual Studio 2008 is not an option.
Background: I'd like to build a Python module for Python 2.7. I have a copy of Visual Studio 2010, but Python 2.7 (specifically the Python(x,y) distribution) is built using 2008. Rebuilding Python, or rebuilding Python(x,y) is not something I want to get into (there are various other modules I want to use as well). My module needs to link against vendor-supplied libraries built using VS 2008/2010 (I've been given both sets of libraries). I don't own a copy of Visual Studio 2008, and I really don't want to have to buy one.
This MSDN article says that although you can change the platform toolset in the IDE you still need to have the VS2008 binaries installed.
I know you said installing 2008 was not an option but perhaps you can still find the free versions in an old SDK or even the Express version on the Microsoft website.

Building C++ CLR app for Platform Toolset v90 in VS2010 requires Visual Studio 2008

I've got a shiny new laptop with the latest Dev tools installed such as Visual Studio 2010.
Now I've got a task to build a C++ CLR app targeting the 2.0 runtime (this is well outside my comfort zone). So I've specifed the v90 Platform Toolset but when I build I get:-
error MSB8010: Specified platform toolset (v90) requires Visual Studio 2008. Please make sure that Visual Studio 2008 is installed on the machine.
Seriously, do I really need to install 2008 as well? Is there some way round this, such as just copying in some folders from a 2008 install?
If not just how much of the VS 2008 installation do I need?
Part of the problem is that VS2010 redid how compiling in c++ (cli or not) works. It now uses the MSBuild structure but I believe what you are trying to do will need the VCBuild framework that is not in 2010.
You may be able to get away with using the Visual Studio 2008 express to build. If not you should only need the c++ portion of VS2008.
Do you need to use the vc90 target though? I build my c++/cli (still new myself) with the vc10 target and it builds fine. (however i am targeting the 4.0 framework referencing some 2.0 portions)
If you set the 'Platform Toolset' in general tab of your project settings to "inherit from parent or project defaults" it will work in most of the cases.
in *.vcxproj
<PropertyGroup Label="Globals"> //Globals
<ProjectGuid>{E0047D4D-366D-4870-980B-DBB5A375BCE2}</ProjectGuid>
<RootNamespace>ECGConvertWrapper</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion> //there
</PropertyGroup>