I have an asp.net core web app. If I click build -> Rebuild, it finishes in just under 15 seconds.
However, if I publish it (via web deploy to azure, FTP to azure, or even just a file system publish to a local folder), it takes a very long time. Over a half hour before I give up and cancel it.
What is different about publishing that could cause this? How can I diagnose this to make it go faster?
I'm not sure if it's relevant, but it spends a long time outputting messages like this:
Added Item(s):
ResolvedFileToPublish=
C:\filepath\bg6.jpg
CopyToPublishDirectory=PreserveNewest
RelativePath=wwwroot\images\bg6.jpg
TargetPath=wwwroot\images\bg6.jpg
Try the following two ways
1.Try disabling windows defender on the machines where publish is slow to see if it fixes the issue.You could have some exclusions to the real-time protection.
2.Make the following settings in your project:
Tools-> Options-> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity
Related
I have an issue which I believe is IIS Express related. I am making a Web App with ASP Web Forms(I know I should be using MVC, but for this project, Web Forms was specified as required). Whenever I build it opens the url http://localhost:53605 and loads the website. The problem is the copy is showing is old, this started happening yesterday, I haven't installed any updates to VS or Windows.
Things I have tried:
Disabling Chome Cache
Using another browser
Change the IIS Express build url (This works, for ONE build and then it's back to the same issue)
Delete the /bin & /debug folders
Does anyone have a solution to this? I can just change the build URL everytime, but anyone who had made an ASP Web App will you rebuild 100's of times a day...
Thanks
If IE setting is OK, then set vs setting
Go to Tools-Options
Under Projects and solution ->
Build and Run select "Always build" under "On Run, when projects are out of date"
For Chrome VS debug, refer
When I open a sample Blinky application in Visual Studio, compile and run it, it gets automatically deployed to the target configured WindowsIoT device. After that, on Windows 10 machine where I compile it, the application binaries are located in the bin sub-folder of the project folder as one would expect.
I would like to automate the deployment, so that I could run deployment code
without Visual Studio, specify target device and the binaries location and it would deploy it. I cannot find any API that allows
to deploy apps to Windows IoT, how do I do that?
This shiny Windows IoT stuff is a new area, and there is not a lot of info available apart from the samples and the getting started page. Any pointers are appreciated.
Update: As noted in comments, once one start thinking of mass production, they will probably need to conciser ICD. This, is not, however the problem I'm trying to solve currently. I would like to figure out how I can provide Over-the-Air updates to my UWP application running on Raspberry Pi and Windows IoT. I also would you like to know how I can automate build / deployment in general, but that may be automatically solved if I have a proper OTA solution.
There is a set of instructions on how to do it, which can be found in the same github repo you are linking in your question, but in a different folder. Note, that you need an appx for these instructions to work, and it's not created by the solution build by default.
This page provide (non IoT specific) instructions on using VS to build the appx. And this blog post talks about the command line tool that can be used for making appx.
Note, that the last two links are also talking about publishing an application to app store, so you'll need to make some mental adjustments around that.
I have a website in C# Visual Studio 2013, which was developed by another developer and is hosted on Azure cloud service. Whenever I make any changes and try to publish, Visual Studio hangs and I can't publish it. It is not showing any error message. Besides that I can successfully deploy it by building it, but as it's taking too much time and also costs money to client (as VS Team Services only provides monthly 60 minutes of free build, after that clients get charged for extra minutes). I am using following steps for publishing and it's works fine but after publishing starts Visual Studio hangs and is unresponsive.
The steps to publish the website are as follows:
1) Open the solution in visual studio.
2) Right click on the azure project in the solution explorer, and select publish.
3) The first step in the wizard is to sign in, make sure to select your credentials.
4) The next step is settings, make sure environment is set to production and build configuration is set to release, then click next.
5) The final step is a summary, simply click the publish button.
I am very new to Azure so let me know if I need to make any setting during set up my project.
I hit the same problem after installing the 2.8 SDK and tools. After checking out these answers I still had the problem, but found a solution.
Right click the Azure project in the VS2013 solution explorer, open project properties. Go to the application tab, and there's an "Upgrade" button to upgrade the project to the latest SDK. That did the trick for me.
It sounds like you are doing the right steps to deploy using the wizard. However I don't have enough information to know what would cause this to hang. There are some documentation details about the wizard that might help? https://msdn.microsoft.com/en-us/library/azure/hh535756.aspx
There are other ways to deploy to Azure, which may solve the issue. You can for example download a publish settings profile, and use this to deploy instead of the wizard. Details here: http://blogs.msdn.com/b/avkashchauhan/archive/2012/05/10/downloading-windows-azure-publish-settings-subscription-configuration-file.aspx
Or you can deploy continuously from Git - https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/#Step75
Both solutions will require some tinkering in the Azure portal or getting in with PowerShell but there's a lot of ways to deploy.
Doing these two things fixed it for me, not sure which:
Clean build
Server Explorer > (Had to re-enter Azure credentials)
VS2013 update 5.
A related post found here..
https://social.technet.microsoft.com/Forums/virtualization/en-US/4e51b1f0-91c3-4ce9-9a15-a8d10f912c5b/publish-cloud-service-causes-visual-studio-2013-to-hang-crash?forum=windowsazuredevelopment
One user was able to get past the publish freezing by doing the following..
So I did a line-by-line comparison between all of the files in that
new project and everything in my existing one and found only two
possible things wrong:
1) The version stamps (dates, really) in my
files were not upgraded to reflect the latest version of the Azure
tools. I manually changed those in my existing project to match the
garbage test project's date stamps.
2) My XML files had some empty
sections that did not exist in the new project's files, so I simply
removed those empty sections.
3) Beyond that, I also deleted my *.user
file.
Specifically, I was able to remove schemaVersion="2014-06.2.4" from my ServiceConfiguration and ServiceDefinition files and it fixed the issue.
My guess is that your installed sdk version is different than the specified schemaversion.
I tried all above methods none worked for me. So this is for people who already tried above and still couldn't make it work.
=> Publish in Release mode :-)
Yes I was trying to publish in Debug mode which was causing it to hang till death ;-)
I have finished a Windows C# application and this is the first time I am going to deploy it. I have searched for many tutorials. The microsoft site tells me to use the ClickOnce method. I have also tried from the Publishing settings. After I double click and install the application successfully, once I try to open it, nothing happens!
I have left all the settings as they are in debugging stage (e.g. Configuration: Debug) and all the other publish settings are left as they are.. can some one be kind enough to provide me with a dummy tutorial as I don't have any clue where to start from. I am saving some data in a file in DEBUG/Data. What will happen to this file?
Don't use the "deploying option" that Microsoft's offer. because its rubbish.
I'd suggest you to do it your self, here is what I suggest:
Protect your source-code with obfuscation.
Compile your application with the release mode (F6) not the debug mode (F5).
Copy your compiled files from "Release" Folder.
Download any Freeware Installer such as "Inno Setup".
Pack your files with the installer.
Distribute your application.
you can also skip the installer part. all you need is to distribute it as a Zip file or Rar.
there are plenty of other steps can be involved depending on how heavy your application is.
I am starting to deploy my desktop application. It is a syntax highlighting notepad. I am considering deploying it on the web. What is like a list of things that I should do before I deploy my application?
Before you deploy an application. On the top of my head (some of what we do before each release)
Test it :-)
Test it on a clean PC. What happens it it does not have .NET installed?
Test it as a standard user (not everyone is an administrator)
"Polish". Use a consistent version on all files (important for later upgrades)
Make sure that licenses, copyright messages are correct. That the year is correct etc.
I am no expert in deploy issues, but perhaps you could deploy to a private server, and see if you can actually do the entire process.
And just as a suggestion, —I know its not directly related to the deployment per se— is it a Web 2.0 style (free/user oriented) app? Perhaps a beta version where people expected to not be perfect would help, although that's more after deployment
As this is a desktop application you could use ClickOnce deployment. This bundles your application and all its dependencies into an installer which you upload to the web. Your customers then either download the installer or run it from the web.
ClickOnce also enables automatic updates. You set the update check frequency on deployment, then just upload the new version to the web. The next time the user runs your application and it's time to check, the new version will get downloaded and installed.