开发者

compile and publish only one .cs file

开发者 https://www.devze.com 2023-01-28 12:52 出处:网络
i have a Visual studio project. it has .aspx, .aspx.cs, config, dlls and so on... Regularly what i follow for loading a gui on the server is:

i have a Visual studio project. it has .aspx, .aspx.cs, config, dlls and so on...

Regularly what i follow for loading a gui on the server is:

  1. build the solution
  2. publish the solution (so i get the published files of the project excluding .cs开发者_如何学Python files) this makes sense as i dont want to give my backend code.
  3. finally i run the gui on the browser.

This works perfectly fine.

But now i have to make a change in .cs file of one of the pages.

do i have to build the solution and publish all the files?? how can i just give the file i made the changes in.

I ask this because it does not look good to a client...

any suggestions?? thanks


If you make a code change you should republish the site. Bear in mind that you can just publish the newly compiled assembly itself and not all of the aspx files.

However, I don't recommend doing this as the time to deploy an entire site isn't particularly large and you might have made a change to an aspx and forgotten between deployments. It's much better to send the whole thing.

Also, this isn't a normal thing for a client to have a problem with. Tell the client this helps ensure robustness of the deployment. After all, if you made a code change in a language like PHP and deployed that single file then you don't get compile time checking and stupid problems like misnamed variables might not show up for awhile or might crater the whole site.

IMHO, it's much better to get the full compile time checks out of the way BEFORE the site is pushed. Of course, this does little to nothing for runtime problems.. but that's a problem you have no matter the language.


C# doesn't have .obj and linker like c++, so if you change one file and want to integrate it in your project, you should compile it in related project (just changed files going to be compiled), also for file compile option see this: http://msdn.microsoft.com/en-us/library/78f4aasd%28VS.80%29.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消