So I'm new to .NET and am working on a command line app. I need to test out passing arguments, which I suppose is impossible to do within Visual Studio. So when I go to OS X terminal and go to project folder and run dotnet run, it throws this error:
error MSB3644: The reference assemblies for .NETFramework,Version=v4.7.2 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks.
Why on earth is it trying to use .NET framework? That is not available on Mac anyway. It should be using .NET core. Somehow it runs in Visual Studio debug mode, but in command line it keeps trying to run it in .NET framework. This needs to be a cross platform command line app so it has to be .NET core. How do I test my app's command line argument input?
4.7.2
in your project files for more info.<package id="DynamicLanguageRuntime" version="1.3.0" targetFramework="net472" /> <package id="System.ComponentModel.Annotations" version="5.0.0" targetFramework="net472" />
Why is the built in Dynamic Runtime using 4.72 if this is a .NET core app on a Mac that can't even run that? How is the debugger within Visual Studio even working at all? Is it safe to delete those packages since I didn't install them and they seem like they're built in?packages.config
, so I wonder how exactly you created this project.