Executing IIS launcher of visual studio with command line - visual-studio

I am facing an issue, I am writting a script to automatize some part in a project.
Basically, it builds a website: building the front end part, creates in IIS the application, virtual directory, application pool and then build the back end part.
But I have an error when I try to access it (here the error in the event viewer (and I don't have anything more)
event viewer error
(For info the folder "bin\ISSSupport" does not exist at this very moment, it is only created after the fix explained below)
To fix it I just need to execute IIS launcher in visual studio:
IIS launcher
I would like to know if there is a way doing this action with command line.
(Or even better if you know a solution to my first problem)

Related

Compileing my blank console application with a setup Microsoft visual studio 2015

so i have a console application that stitches a pdf into one big long tif however when i go to make a setup project it all seems to work fine until i move the installer to another commutator and run it it installs fine however whenever i run the application it gives an error
The program can't start because ucrtbassed.dll is missing from your computer
i have seen videos where when they add the primary output some msm file is added depending on the library's used in he code however no such file appears when i add my output in the application folder section in the main setup file
edit::
i feel that i cant explain this correctly and thus will upload it as and image this is the main application file inside of the setup project it looks like its only copying the source code when it should also include some dlls
application folder on the setup wizard
You are shipping a debug version of your app, and it is failing because it is asking for the debug version of the Universal CRT (that's why there is a "d" on the end, and it's actually ucrtbased.dll). In general the debug versions of these are available for debugging on developer's machines, not for client machines. So build a release version of your app and see what it does. If it fails looking for ucrtbase.dll, then clients can use this to install it:
https://www.microsoft.com/en-us/download/details.aspx?id=48234

Web Application deployment using nant scripts not happening using vs 2013 command prompt

I was using VS2005 previously for two web applications and was deploying the applications using vs2005 cmd prompt. But I recently migrated to VS2013 and the same nant scripts commands are not working fine when I execute them using vs2013 cmd prompt. I'm getting the below error message in at the time when it fails
External Program Failed: aspnet_compiler.exe (return code was 1)
Can somebody please help me out with this thing. One application says successfull but when I open the application using the url it says page not found.
I finally got it resolved it is the problem with versioning. VS2005 dev cmd prompt by default picks aspnet_compiler from v2.0.50727 however VS2013 dev cmd prompt by default picks up from v4.0. So I replaced
program="aspnet_compiler.exe" with program="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe" and it solved the problem for me.
Thanks all
aspnet_compiler will compile all the views (*.aspx, *.ascx, *.cshtml, etc). It's roughly akin to running each page and validating it renders correctly. This is a great way to validate all your pages are free from hard-to-find run-time errors. Since aspnet_compiler ran, the issue isn't that it isn't in the path. It may be that it's using VS 2005's aspnet_compiler or from a different framework version, but that's less likely. More likely is that you have a syntax error in a page or user control. Look at the build output around the "return code was 1" message and find the additional detail about the page and line that is failing.
Another not-recommended option is to comment out the aspnet_compiler line from your nant file, but you then lose all the benefits of this precompilation / validation.

What is the path to an installed ClickOnce application?

I wrote a "Hallo world" type Windows Forms application in C# to test authentication issues. I'm going to be running the eventual application from a server periodically, so I want to be sure I can get to the resources, and fix that before committing to the whole application.
So, in Visual Studio 2010, I choose Publish....
It says "Where?", and I specify a folder on a shared file system.
It says "How will your users install", and I say, "URL" or something like that.
It says "Where", and I give it a URL in the same shared file system, different folder.
All is right with the world....
Now, I install it on my server by double-clicking "setup" on the shared file system where I published the application.
Now, I find a shortcut in my start menu, all good.
Now, I want to set it up so SQL Server Agent executes it periodically (and tests authentication...) so, what is the URL I give it to execute? I've been trying everything, but not going so well. I don't understand the publish method much at all....
How can I fix this problem?
Look at the Start menu shortcut for your installed application and you'll see that it points to a "ClickOnce Application Reference" (.appref-ms) file buried deep within your user folder. You can start the application by executing that file.
Example:
Process.Start(#"C:\Users\Igby\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Microsoft\MyClickOnceApp.appref-ms");
I don't know anything about SQL Server Agent, but try giving it this path.

How can I properly publish my Windows desktop application in such a way that will ensure the end user has the right files needed to run it?

I have created a small desktop application using .NET 4 for generating an authentication string. It runs fine on my Windows 7 computer, however when I deployed it to our QA guy on his Vista machine, it gave him an error saying he needed to install .NET 4... FAIR ENOUGH. We installed .NET 4, however the next error said that "Microsoft.Web.Infrastructure.dll" was missing from the GAC. Crap. So I poked around a bit and found this:
I then set Publish Status of Microsoft.Web.Infrastructure.dll to Include and published again. This time it gave him an error about "System.Web.Mvc"! So I knew I was on to something. So I went and did this:
However, now when he runs it it just says it can't download files required to run the application, and will not specify what they are!
How can I properly publish my Windows desktop application in such a way that will ensure the end user has the right files needed to run it?
Note: I think Razor and MVC are included because this windows desktop app project is dependent on some other projects in this solution that are using MVC. (Basically this desktop app is using some of the Models.)
Edit: Here is the end result (README was added by me not VS)
As it turned out, the second screen shot view with everything set to Include was the proper way and worked fine while the first screen shot caused missing DLL errors during install. It really was just an FTP upload user error that had the installer looking for a folder that was not there, which is why the second version did not work the first time.
I think you should be looking in the Prerequisites dialog from the Publish tab of the project Properties window, not the Application Files dialog. Not sure if this is an SP1 feature or not (I have SP1).
Image reply from Ryan (question poster):

Crystal reports crashing visual studio

Ive got a C# 2.0 app that launches the Crystal Reports viewer and displays some reports. If I run this in Debug or Release mode OUTSIDE of visual studio, it runs fine. If I debug this through Visual Studio 2005, the report will pop up, but then a minute or two later VS freaks out on a ContextSwitchDeadlock, also telling me that no symbols have been loaded for any call stack frame so i can't debug it.
This likely has something to do with the fact the report is being launched on another thread. The reasons for this are a little convoluted but I'll try to explain in case it's important:
We have a long-running process that runs on a background thread. When the process is done it launches reports. If it(the background thread) just calls Show(non-modal) on the report viewer forms, it will then terminate and kill all those report forms immediately. So instead it launches one child thread per report and calls it with ShowDialog(modal). That way the forms are all seemingly non-modal to each other, but when the user closes the LAST one, the background process thread now has no child threads and it can terminate.
Does this makes sense, and does anyone have any idea why I'd be getting the ContextSwitchDeadlock MDA inside VS, but no exception is thrown when the code runs standalone?
Try renamining you c:\temp\ directory - There is a know issues that if there is an XML file in the c:\temp\ Crystal Reports Crashes and you cant open them..
I think you answered your own question... it has to do with how your running it in a separate thread.
Delete or move any .xml files in your c:/temp folder if you have one. They cause database expert to crash VS
Got the same problem. It's been known to cause database Expert to cause VS to crash also due to some xml file being in your c:\temp directory. First option is, to empty the c:\temp directory (worked for me). Second you can try to rename your temp directory to "MyTemp" or something similiar. And last but not least you can try setting your project to use 4.0 Framework not the client version.
P.S:#John Cruz Nope he didnt, I don't work with separate threads in my project and got the same ContextSwitchDeadlock-Error.

Resources