Tell MSDeploy.exe to skip deploying a few select files in subsequent deployments - asp.net

How do you tell MSDeploy.exe to skip deploying a few select files in subsequent deployments?
For e.g. I deploy a package that has files A, B and C. Then, I make another fresh build and therefore another package of the same application, only this time with the new version of the binaries A, B and C.
Now, I want MSDeploy.exe to deliver/deploy only files A and C, and to not deploy the new version of file B.
Is there a way to do that?

I think you can create a rule in the config file if you wish to skip those files in every single deployment.
The config file is located at C:\Program Files\IIS\Microsoft Web Deploy V2. It is called msdeploy.exe (XML Config File). The sample config file is in the same directory as masdeploy.exe.configsettings.example
Please post your solutions or any other findings.

Related

Azure devops VSBuild , Argument Outputpath

Hello I need to upload to Artifact the results of the VSBuild of the Solution but I can not use OutPutpath I get an error that the solution can not copy to certain files.
If I do not put an outputpath in the argument everything works fine, but I do not know what is the place of the VSBuild results to upload them to Artifact.
When using the VSBuild task to build a solution, normally the build artifact should be output into the directory of each project in the solution. So, the output path you set on the VSBuild task should be a relative path to each project directory.
You can follow the steps below to set up your pipeline:
On the VSBuild task, set the output path like as this.
-p:OutputPath={the relative path}
After the build, use the Copy files task to copy the artifact files form the output path to the directory $(build.artifactstagingdirectory).
Then use the Publish Pipeline Artifacts task to publish the artifact files from the directory $(build.artifactstagingdirectory).
The above are the most common steps to build projects and publish build artifacts in the build pipelines.

A .jar file does not run after building it

Actually, I'm trying to add new language to Streama Media Server. I downloaded source code, added new language file (as guided here). After that, I want to build a jar with that project, I build it with IntelliJ Idea 2021.1 (here is how I did). So, When I run that jar file (in Ubunt 20.04), it fails and gives this error: Screenshot
When you have made adjustments to the source code, it is likely that you will want to create a new .jar file and deploy it on your server. For this, you can use a simple command:
# for unix based systems
**./gradlew assemble**
# for windows
**./gradlew.bat assemble**
This will create 2 new .jar files under build/libs,
streama-{version}.jar
streama-{version}.jar.original
all you will need is the streama-{version}.jar.
This file is an executable, so you can just copy it into your deployment directory / your server and start it as usual.

How to use my own DLLs instead of the one referenced by a dependent package

I'm using a nuget package (let's call it A) which has dependency to another package, let's call it B.
To include A in my project, I changed .csproj file to:
<ItemGroup>
<PackageReference Include="A" Version="2.0.5" />
</ItemGroup>
When I run nuget restore package B is consumed from some nuget source too.
I want to replace dlls of package B with my own DLLs, I've created myself.
I can do it on my local machine by just copy pasting the desired dlls in bin folder. But how can I do the same on Azure Websites? Is there anyway to automate this process?
Is there any way to tell nuget not to fetch DLLs of B from nuget source and instead use my desired ones?
Update:
Thanks to Shahryar's contribution, we can also choose to add the dll file and set it to be copied to the compilation folder for implementation (define properties in the .csproj file).
In fact, it is mainly to change the content of final compiled files, because after the final deployment, it runs according to the compiled files.
Original Answer:
You can compile the web app locally first, and then replace your dll file with the corresponding file in bin. Use zip to package the entire compiled file, and then use zip deployment to directly upload the final compiled file to Azure (the operation of the web app deployed to Azure depends on the file uploaded in this way)
Have a look of Zip Deploy.

Visual Studio Team Services dotnet publish

My build completes with no errors, but it creates a randomly named zip file (s.zip) for the release step.
After the release step, I end up with that s.zip in inetpub/wwwroot/admin-tool/ folder. I'm almost there, but I want it to unzip and dump all the contents in here. This should be automatic, shouldn't it?
My dotnet publish looks like this:
and cause this to run, which is how I get the s.zip:
C:\Program Files\dotnet\dotnet.exe publish C:\agent\_work\3\s\Angular.AdminTool.csproj -c release --output C:\agent\_work\3\a\s
If I try to edit the -o argument and make it -o $(Build.ArtifactStagingDirectory)/admin-tool I will just end up with C:\agent\_work\3\a\admin-tool\s.zip
Is getting the name of my zip to be the same as the name of my web-site (admin-tool) the key to getting the zip to automatically extract in the release step?
In case it help others, I used the simple command line tools rather than the pre-canned "dotnet core" ones:
and for the Archive files task, be sure to include a hard-coded name for the zip to be used in the build process:
And for the release, in the "Deploy IIS App" task, be sure to include the full path for the zip file:
I also ran into this issue but solved it another way.
In my case I have a single project to build and deploy.
The $(Parameters.RestoreBuildProjects) value is set to a single project
MyProjectFolder/MyProject.csproj.
In the .Net Core Publish task, this value is used in the Path to Project(s) field.
Then I tick both the boxes for
I saved and queued this pipeline.
The zip file created seems to be derived from the name of the folder
so I ended up with a zip file in the artifact staging directory with the name of the project. Then the Publish Artifact task placed this zip file into the Artifact that is named in that task.

Qt renaming path of the project

sometimes when I rename the path to a qt project, it cannot be run even though I clean qmake and rebuild it!!! the path does not contain any space. and the project is completely correct and I know that the error is for path renaming , for example when I rename :
D:/abd/projects/LAND_2/Land_QT/...
to
D:/abd/projects/LAND_2/Land2_QT_SA/...
it cannot be build and says that some include file is missing(but the file is there!).
what is the problem?
I work with dynamic qt5.2 on windows 7.
Edit:
when I copy the project folder to a new directory( a path upper than current path) then the project can be build and run.
When you rename the path to the project, go to the project folder and delete the file with .pro.user extension. Open the project and Qt will ask you to configure the project. Choose the required kit, build and run the project.It should build successfully now
If you have changed path multiple times the .pro.user file is created multiple times delete all files with this extension and compile

Resources