Do I really need Visual Studio or is VS Code enough?

A friend of mine got me thinking.
"Can I run this code with just VS Code?"
She's not a developer.  She's like this super smart consultant / solution architect / know it all type.  You know the type.  The person who can solve just about any technical problem without writing a custom app.

She sent me some code that she wanted to try out and she didn't want to do a full install on Visual Studio.  I was on my phone so I looked at the code on Github and it looked at first like .NET framework solution.  I looked in the csproj file and it was .NET Core but I couldn't confirm if she could just clone it and run it.

So I'm trying it out.  A few quick commands in terminal or PowerShell and we are up.

git clone

cd .\azure-search-knowledge-mining\

cd '.\02 - Web UI Template\'  

code .     

Yep, spaces in the folder names.  Oh boy!  This isn't looking promising.  But wait.. there we go.

That looks good.  We'll just restore the packages by clicking 'Restore' and 'Yes'.

warning NU1701: Package 'Microsoft.AspNet.WebApi.Client 5.2.2' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' 
instead of the project target framework '.NETStandard,Version=v2.0'. 
This package may not be fully compatible with your project.
  Restore completed in 3.77 sec for c:\Users\trend\source\repos\Azure-Samples\azure-search-knowledge-mining\02 - Web UI Template\CognitiveSearch.Skills\CognitiveSearch.Skills.csproj. 
Done: 0.
  Restore completed in 20.44 sec for c:\Users\trend\source\repos\Azure-Samples\azure-search-knowledge-mining\02 - Web UI Template\CognitiveSearch.UI\CognitiveSearch.UI.csproj.
Done: 0.

That warning isn't looking great.  It looks like one of the projects is using .NET Framework and not .NET Core.

Lets run the app and see what happens.

It looks like the web project is going to work but the library project needs some help.  My guess is that we have to use MSBuild to build the solution first before using .NET to run the the web application.

It might just mean this app and library won't work on Linux or Mac.  That is also kinda sad.

msbuild .\CognitiveSearch.Template.sln 

This looks promising.   I need to go set up some api keys and we are there.


Popular posts from this blog

Special Characters are Truly Special

JavaScript should be your favorite language

.NET Maui and VS Code