Is it possible to simply build a web package using only MS Build? I'm trying to build it but keeps complaining that MS Web Deploy isn't installed.
I have worked on automating the build process for my asp.net mvc application. If it is an asp.net or asp.net mvc application, we need to use web deploy. If we run aspnet_compiler on our application it creates a precompiled output and on deploying this to iis works fine. In order to create a build artifact, we need to use web deploy. Reply if you need more, I could help you as I did this early.
Related
I have a hard requirement from the developer to use a website project instead of a web app project for a .net deployment. I am able to connect and use continuous integration just fine with a web app project, but when using website, it fails to find the compiled files for deployment:
#[debug]check path : D:\a\_tasks\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-
0ae63477cebe\1.142.2\task.json
##[debug]set resource file to: D:\a\_tasks\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\1.142.2\task.json
##[debug]system.culture=en-US
##[debug]PathtoPublish=D:\a\1\a
##[debug]check path : D:\a\1\a
##[debug]ArtifactName=drop
##[debug]ArtifactType=Container
##[debug]system.hostType=build
##[warning]Directory 'D:\a\1\a' is empty. Nothing will be added to build artifact 'drop'.
Looking at the build process, it's compiling a copy of the deployment to the PrecompiledWeb folder instead of the debug folder, which seems to explain why it cannot find the results. Has anyone had luck deploying with a website project or have you run into the issue above?
Azure DevOps Continuous Integration with asp.net website project instead of web application
Since the project is asp.net website, you may need use the website.publishproj file instead of the .sln file when you publish the asp.net website project with MSBuild.
The command line like:
msbuild.exe "<PathToTheFile>\website.publishproj" /p:deployOnBuild=true /p:publishProfile=WebsiteTestDemo /p:VisualStudioVersion=1x.0
With this setting, MSBuild does not create the PrecompiledWeb folder and the publish uses the setting in the profile.
Check my previous thread for some more details.
The website project the publish process is not plumbed into the build
process. For website project since there is no formal build process
there was nothing for us to really extend.
Hope this helps.
I made a .net core web API project. My project has 3 layers. The first and second layers are .net core class library and the third layer is .net core web API.
When I start the web layer in Visual Studio with iis express no problem I can work with my web services but I want to publish it on my localhost it doesn't work.
I followed this tutorial:
https://www.youtube.com/watch?v=ZZfRlBMHds8 and when I try it with my project it doesn't work.
What should I do?
I also tried an empty web API project but it doesn't work either.
I would make sure you have he IIS_IUSR permission for the directory the the WebApi is located in. Then, I would open the solution in VS as the administrator and right click the WebApi project and select Publish. This will open the configuration part of publishing your WebApi and you can set your settings here. Make sure you can connect to your IIS site you wish to publish to and save your settings. Then stop IIS, publish, then restart IIS. Hope this helps.
I have forked a Visual Studio-made website on github and am trying to open it with JetBrains Rider. It has no .csproj file (but does use a .publishproj file - think this is Azure related). As such Rider finds no projects to run and I can't seem to set up a run configuration for the local web server.
When I run it in VS I can hit F5 and the localhost webserver starts up and servs my browser the pages nicely. Anyone know how to setup the same in Rider for a ASP.NET Web Site ?
Cheers
EDIT: This is the root of the difference I'm seeing - Rider is fine with Web Apps that have .csproj files but can't seem to create run configs without
ASP.NET Web Site or ASP.NET Web Application?
I'm trying to publish the sample web application in Visual Studio on smarterasp.net, but I can't complete the publish process beacause smarterasp doesn't allow to load exe files with the free account. However it seems that asp.net core is allowed with every type of account.
Have someone ever had the same problem? Do you know if it's possible to deploy an asp.net core application without exe files?
After successfully following this introduction to Web API 2 (although unable to "run" by pressing f5) I am really confused as to what is built and what is run when you create a WebAPI2 project. The only way I was able to test if it was working was by right clicking the project and clicking View -> View in Browser. I can't seem to find any .exe in the build folder (the app does build fine) to run.
What exactly is built and what is required to run a WebAPI2 projecT?
Your only output in a web project are a bunch of DLL's and maybe some static files that you could be using in your project (see this link about ASP.NET Web Project Folder Structure) . You don't have a .exe or an executable file in this case. Your built app requires a web server in order to execute, and when you are developing a project you have some options. Check this link about Web Servers in Visual Studio.
In order to run your project pressing F5, check if your ASP.NET Web Api project is configured as startup project. Check this link about how to configure it.
If you are still having any issue trying to run your web application in Visual Studio, please provide us with more information about your problem or errors, so we can provide you a better answer.