Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
148 views
in Technique[技术] by (71.8m points)

Successfully built Asp.Net Web Application on Jenkins. Isn't Jenkins Server sophisticated enough to use said built solution on IIS?

At work, our C# application was developed in a development computer with the following( and our application builds and runs correctly in the development environment):

-.NET Framework 4

-Visual Studio 2010

-ASP.NET Web Forms

At work, we have the following standalone build server that has

-Windows Server 2012

-Jenkins with MS Build

-For .NET Framework 4, the MS Build version is:

C:WindowsMicrosoft.NETFrameworkv4.0.30319>MSBuild.exe -version

Microsoft (R) Build Engine version 4.7.2558.0 [Microsoft .NET Framework, version 4.0.30319.42000] Copyright (C) Microsoft Corporation. All rights reserved.

Our standalone back-end SQL Server for the application is:

Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Apr 2 2010 15:48:46 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) (Hypervisor)

Our .NET Team and our operations team had to go through a lot of trial and error to get the Jenkins server to build our ASP.NET web application solution which contains 17 projects. Here were the changes that we had to make to said solution to get the Jenkins server to build said solution withOut errors

  1. We had to resort to using an Unconventional practice (i.e. hacking LOL) called ‘Bin Deploying’

https://www.hanselman.com/blog/BINDeployingASPNETMVC3WithRazorToAWindowsServerWithoutMVCInstalled.aspx

We had to ‘Bin Deploy’ dlls associated with Microsoft SQL Server and some Microsoft Visual Studio assembly dlls because we want to Avoid installing Microsoft SQL Server and Visual Studio applications, and their corresponding update service packs(SP).( It’s really Unconventional which is Not ideal. )

SynchronizationAnalysisServicesManager.cs(4,17): error CS0234: The type or namespace name 'AnalysisServices' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [E:JenkinsworkspaceAFSDEVProjectsAcmeAcme_Web_BuildStrange.Acme.SecurityProviderStrange.Acme.SecurityProvider.csproj]

  1. On the Jenkins Build Server, we used to get the following error:

ActiveDirectoryActiveDirectoryProvider.cs(84,13): error CS1752: Interop type 'ActiveDs.PathnameClass' cannot be embedded. Use the applicable interface instead. [E:JenkinsworkspaceAFSDEVProjectsAcmeAcme_Web_BuildStrange.Acme.SecurityProviderStrange.Acme.SecurityProvider.csproj]

Therefore, based on the following posting: https://stackoverflow.com/a/2483688/6888123

I opened up Strange.Acme.SecurityProvider.csproj in notepad, and the set the Interop.ActiveDs assembly dll, I made the False ( i.e. set to False )

False False
..!SharedlibInterop.ActiveDs.dll

  1. We added /p:GenerateSerializationAssemblies=Off , and according to (https://stackoverflow.com/a/9187464/6888123 ) it says that build times and startup times will be slower, but we had to turn it off in order to stop the following error:

"E:JenkinsworkspaceAFSDEVProjectsAcmeAcme_Web_BuildStrange.Acme.ReportingStrange.Acme.Reporting.csproj" (default target) (7) -> (GenerateSerializationAssemblies target) -> C:WindowsMicrosoft.NETFramework64v4.0.30319Microsoft.Common.targets(2769,5): error MSB6006: "sgen.exe" exited with code -2146232576. [E:JenkinsworkspaceAFSDEVProjectsAcmeAcme_Web_BuildStrange.Acme.ReportingStrange.Acme.Reporting.csproj]

However, the IT operations team was saying that the next step is to package or even publish said solution. I've been searching the internet (especially stackoverflow.com postings), to find a way to package or even publish our solution using commandline msbuild on our jenkins build server( and I would have to use msbuild or some other commandline program because installing Visual Studio 2010 on a build server is bad practice. ) So when I searched the internet, it seems that trying to use msbuild to package or even publish our solution is really a pain because we have to create custom targets in our .csproj files.

Since we already successfully ran build on our solution within the Jenkins Server, I thought there might be a way for Jenkins to just use the built solution to serve the pages? Isn't Jenkins Server sophisticated/intelligent enough to use said built solution on IIS?

question from:https://stackoverflow.com/questions/65834635/successfully-built-asp-net-web-application-on-jenkins-isnt-jenkins-server-soph

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...