Open aligneddev opened 4 years ago
It is important to note that the publishing in ADO .Net with the Visual Studio Build task (msbuild /t:packge) works with .Net Core 2.2. I haven't checked the differences in output between msbuild and dotnet publish for the Microsoft.Data.SqlClient.dll
I recently had a several day fight with a run-time exception. I lost way too much time on this :-), but have found a work around. I'm not sure if it is the best, but it works.
I'm hoping there is a fix that Microsoft can do to help others avoid the difficulties. I wasn't sure if this is the best place to create the issue. Azure Functions had some similar issues in their repo.
Here's a summary, more details can be found in my blog post
Visual Studio, right-click publish on the .sfproj worked great. The Azure DevOps pipeline release has this run-time exception.
My Solution I finally decided to go my own way. I know that dotnet publish got the right dll. I also learned that I couldn’t use dotnet cli to create a SF package. I created a .bat file to have something to run locally quickly. Then I moved that .bat file into the Azure DevOps build and called that. In the future, I may split it back out into separate build tasks.
I have the bat file in the blog post. Notice the steps.