Sunday, October 8, 2017

.Net Core 2 With Tests In Same Project Error CS0017

As I was working on a project that I had migrated to .Net Core 2.0 that used XUnit, I ran into a bit of a dilemma. Upon compiling, I received an odd error: CS0017: 'Program has more than one entry point...' I only had one main method, so I knew this had to be an error and began digging. What I found is that the Microsoft.Net.Test.SDK was actually adding an additional entry point to the compiled output. This can be resolved very simply by updating csproj file's property group with the following:


  <PropertyGroup>  
   <TargetFramework>netcoreapp2.0</TargetFramework>  
   <GenerateProgramFile>false</GenerateProgramFile>  
  </PropertyGroup>  

The solution to this problem was provided by Faizan2304 here:
https://github.com/Microsoft/vstest/issues/636

Thursday, August 24, 2017

Welcome

Welcome all! My name is Richard Nunley and I love technology. From robotics to Software Engineering I simply can't get enough, and I'll be sharing my exploits here. Expect to see regular articles on machine learning, 3D printing, computer vision, .Net and Python programming and whatever else my daily spelunking leads me in to.

My goal is to make all these subjects approachable to beginners while having enough depth for experts as well and I will always make myself available in the comment sections. So, please, check back regularly and I hope you enjoy the ride as much as I do.

.Net Core 2 With Tests In Same Project Error CS0017

As I was working on a project that I had migrated to .Net Core 2.0 that used XUnit, I ran into a bit of a dilemma. Upon compiling, I receive...