How can my published folder automatically update when I compile my ASP.NET Core 3 application? - asp.net-core

I have an asp.net core 3 application deployed on IIS. I made this by publishing the website on a separate folder, and reference that folder when I added a new application in IIS. It works, I can access it from different computers, but this folder doesn't get updated when I'm doing modifications and compile the project. I always have to publish it whenever I make small modifications. How can I overcome this situation?
This is how my folder looks like after publishing my project.

Related

obfuscating SPA (Single-Page-Application) binaries and .dll files to secure startup.cs and context.cs classes

I have developed a SPA (single-page-application) using react and Asp.net core and published to a folder as a self-contained App which will be deployed on the client desktop computer and work as desktop app.
I want to obfuscate the binaries and .dll files of published folder using neo-confuserex so that the user may not decompile the app to see startup.cs,context.cs and controller.cs classes.
the screenshot of the folder structure of the published folder is attached here.
here is second
as there is a long list of files so the last screenshot is here
my question is to identify the files which should be obfuscated and leave the extra remaining files which are necessary to run the app on desktop computer.

How to publish .net core project to smarterasp.net from vscode?

I need to publish .net core project to smarterasp.net server. I use visual studio code. How can I deploy my project?
I've run into bugs with Web Deploy, so I use a Folder (aka 'File') deploy to a local folder and then FTP the content of that folder to the root website folder at SmarterASP.NET. The main trick is that when you set up your publishing profile, you must change to 'self contained' and target x86. If you leave the default settings, your site won't work. I'm referring to Core 3 here....
since I don't know the smarterasp.net provider, but unless you have a free hosting plan, smarterasp.net declares that ASP.NET Core 3.x is already installed for which you only need to build your project and inserting it in the root of your IIS site without installing the core framework on the server would not work.
Good luck.

Where is Web.config during development?

When I publish my ASP .Net Core 1.1 MVC web app, I see the Publish folder contain a Web.config file, where I can set stdoutLogEnabled, etc. However, while developing I don't see this file at all - it looks like it's being generated when publishing... How can I therefore set the variables in this file without having to manually edit the file after each publish?
Web.config only makes sense if you host the app on Windows with IIS. You have to manually add it to the project to edit the file's contents or it will be auto-generated:
Documentation:
If you don't have a web.config file in the project when you publish with dotnet publish or with Visual Studio publish, the file is created for you in published output. If you have the file in your project, it's transformed with the correct processPath and arguments to configure the ASP.NET Core Module and moved to published output. The transformation doesn't touch IIS configuration settings that you've included in the file.

ASP.NET MVC plugin architecture & deployments

For a customer we have an ASP.NET MVC plugin architecture consisting of:
- 1 core web application (this is the root web application in IIS)
- X plugins for which the content (views, css, scripts) are deployed in a sub folder (Areas)
The assemblies of the plugins are deployed in the root bin folder
The plugins are created by separate teams and these teams should be able to deploy a package to a server.
The package (ran by administrators) should make sure the plugin is deployed correctly (in a sub folder of the core) and the dll files should be deployed in the root bin.
I guess a deployment package should be created.
How can this be done or what are good practices around this?
How can I customize the way a package will be interpreted (MSBuild)?
Bit of a late answer, however I have been using a method of creating 'pluggable' areas similar to that discussed here and here.
What these articles talk about is a method to turn areas into separate web projects which can then be bin deployed with the original web app when required.
I have extended their methods with a custom ViewEngine which inherits from the Razor view engine, to look for Views in a specified folder location (I named this folder 'Modules'). This is dynamic based upon whether the modules are included or not (I search for modules in the Modules folder on app_start).
Hope this helps!

Deploying external files from visual studio with .NET CF application

I am working on a .NET CF 3.5 application. There are few external files\assemblies that the application is consuming. These files are not part of the project, therefore while debugging when I deploy the project, these external files are not deployed to the device.
Is there any way I can deploy these files with project without including them in the project?
You can't get Studio to deploy arbitrary files without telling it what files to deploy. The only way to tell Studio to deploy files is to either add the files to the project (as a Resource or a Content file) or by adding a reference to them (for .NET assemblies).