ASP.Net Machine.Config Transformations - machine.config

I am creating a strongly signed class library that contains an ASP.Net HttpModule and HttpHandler.
I have created a visual studio setup project for my library that installs the library in the GAC, however i want to add an assembly reference and the HttpModule and HttpHandler to the machine.config of the destination machine of my Visual Studio Setup Project.
Before i go reinventing the wheel, is there an easy way to do this using the Visual Studio Setup project?

My final solution was to:
Create a commandline application that did everything i wanted it to do
added my commandline app to the payload of my setup project
ran the commandline app through custom actions in my setup project on "install" and "uninstall"
Someone may still be able to enlighten us on how this can be done using built in functionality.

Related

How to Publish dotnet webapi application that have mutiple projects to iis

[![this is my webApi project solution structure.this have multiple projects added][1]][1]
how can i publish these kind of projects in visual studio 2019
[1]: https://i.stack.imgur.com/Z42EP.png
I'm assuming by publish you do not mean you just want the DLL's.
Those are class library projects, they cannot be published by themselves.
If you want to publish a project you need to build either a web api, console application, wpf, web forms, etc. You can then add the class library projects as project references to the project you wish to publish. When you publish one of those projects, the dlls for the class library projects automatically get built along with them.
In the example in the screenshot you provided, you would publish "ThriftPlanningWebApi". That would automatically publish all the dlls for the class libraries along with it.
If you do want the raw DLL's simply build the project in release mode, navigate to the file location of the project. In the bin folder there should be a folder called "release". That folder will contain all your dlls.
Let me know if you need anything else.
Happy coding :)

How to package and deploy asp.net web application

I am currently working on automating the build and deploy of an asp.net web application which is developed using vb.net in visual studio. Currently, developers are building the solution and projects using visual studio IDE. In the solution, they have deployment/setup projects (vdproj) for each environment (e.g.: app.setup.dev, app.setup.uat, app.setup.prof) which creates msi for the deployment and the web.config is embedded on it.
We are using github for scm, jenkinsfor build/CI and udeploy for deployment.
I am able to build the solution using msbuild cli thru jenkins. However, vdproj cannot be built using msbuild. Alternatively, I installed Visual Studio and MS VS Installer Projects Extensions in my build server, then build the vdproj using devenv. I am not sure if that is a correct way, maybe it is just a workaround.
What is the appropriate way to package the deployment artifacts (contents files, dlls, web.config) and deploy them? And How? If there’s another way to do it rather than creating MSI, it would be great as I don’t have to get a license for the Visual Studio in my build server.
I am currently working on automating the build and deploy of an
asp.net web application which is developed using vb.net in visual
studio.
Maybe you can try publish asp.net web-app by msbuild command-line.
1.As far as I know, we can build and deploy by Visual Studio, see this document.
2.And without VS, you can build and deploy(publish?) by msbuild command-line, there are many resources about this topic.
See:
How to deploy an ASP.NET MVC application on build using MSBuild in Visual Studio 2015?.
How to build and deploy a web deployment package using MSBuild
Using MSBuild.exe to “Publish” a ASP.NET MVC 4 project with the cmd line
In this way, you can get similar function by specifying the parameters and don't need to have VS installed in the server.
What is the appropriate way to package the deployment artifacts
(contents files, dlls, web.config) and deploy them?
Do you have to package them into .msi or .zip and then publish it. If not, simple msbuild command like: msbuild xxx.sln /p:WebPublishMethod=xxx /p:PublishProfile=xxx is enough.
Not certainly sure if it's what you want, hope it helps.

What is the purpose of Microsoft.AspNetCore.Razor.Tools?

What is the purpose of Microsoft.AspNetCore.Razor.Tools?
I'm using visual studio code on os x
From the git hub page https://github.com/aspnet/RazorTooling I can see
The Razor syntax provide a fast, terse, clean and lightweight way to combine server code with HTML to create dynamic web content. This repo contains tooling that interacts with the DNX Design Time Host to provide a Razor editing experience.
Does visual studio code use this assembly? What is a DNX Design Time Host? When would I need to include this assembly in a project?
I found a reference to it in the project.json of a web application project that I generated using yo aspnet.
At least here: https://www.nuget.org/packages/Microsoft.AspNetCore.Razor.Tools/ you can see a brief description of library:
TagHelper tooling for .NET Core CLI. Contains the dotnet-razor-tooling
command used to resolve TagHelperDescriptors for projects at
design-time.
And here you can find a bit more details: https://docs.asp.net/en/latest/mvc/views/tag-helpers/intro.html#intellisense-support-for-tag-helpers
On mac you can run the same command:
dotnet razor-tooling
but it doesn't make any sense because for now VS Code doesn't provide any intenseness for Razor views. So probably you can remove this dependency from project.json.

Configuring existing ASP.NET project for DNVM, DNX environment on a Mac

I have an ASP.NET Web API project created on Windows using Visual Studio. How can I set this up for use with DNX/DNVM (on a Mac)?
Switching to Git solved the source control compatibility with TFS. But I wasn't able to find references to getting a project working across both these development environments.
I'm assuming as a first step the project will have to be migrated to ASP.NET 5/vNext but wondering other problems lurk around the corner with different project members using different environments.
I get an error when I run - git:(master):dnx . kestrel
As you mentioned yes you will have to migrate any namespace changes. I have a project that is developed across both. Also changing csproj files to xproj. Support is coming for some kind of interop between the different project types but its not here yet.
For build, publish, deploy from git without relying on VS publish capabilities or MSBuild you can follow my blog post here.
Basically you use DNU to publish and then kudu to deploy.

How to deploy ASP.NET MVC application with devexpress components to Azure websites

Is there a way to deploy asp net application with dexexpress components other than using virtual machine with installed libs on it?
I want to deploy it to azure websites but get an error that .dll are missing (dont get that error during debugging on localhost where devexpress installed).
Be sure, that you marked the referenced assemblies that you want to publish on the vm as "copy local = true". You can find that option in the properties of a reference.
The output folder of your web app will be automatically copied over to azure websites. For more information how web pages are packaged have a look How to: Create a Web Deployment Package in Visual Studio
You can try one of these options:
Find a NuGet package which includes the dll's you need. I don't know which components you use but NuGet contains a lot of packages -> https://www.nuget.org/packages?q=devexpress
Include the dll's you need in a 3thPartyLib in your project and then reference these assemblies (with copy local = true) from your project.
Be sure to include the license file in your deployment.

Resources