locked
Can I just upload a new project1.csproj file to Dev server (IIS), without re-build and re-deploy, and expect the application to work? RRS feed

  • Question

  • User747696199 posted

    HI,

    We just launched a MVC3 ASP.NET application.

    There is 1 function that is working on our dev laptop, but not on the server (IIS); we found out that this is due to: 1 project is still references an old version of EF 4.1.0.0; and could not find it. We need to make it reference EF v4.4.0.0. This dll is already in the bin/Release folder for this project on the server.

    Now, we were told not to re-deploy to the server at this point; so my question is: can I just make change to this project's .csproj file, in the "Reference" part, change the 4.1.0.0 to 4.4.0.0, then upload this .csproj file to the server, replace the old .csproj file, and expect the application to work?

    Please let me know if we can do this?

    Thanks,

    Claudia

    Monday, November 9, 2015 11:41 PM

Answers

All replies

  • User1992938117 posted

    can I just make change to this project's .csproj file, in the "Reference" part, change the 4.1.0.0 to 4.4.0.0, then upload this .csproj file to the server, replace the old .csproj file, and expect the application to work?

    No, It will not work as you are not going to compile your application.

    Also for deployment you have to publish your application and deploy the dlls and static pages/css images its, we should not upload whole source code to the production server.

    Better to use publish option in vs and deploy all the files folders available in published location.

    https://msdn.microsoft.com/en-us/library/dd465337(v=vs.110).aspx 

    https://support.discountasp.net/kb/a1286/how-do-i-deploy-visual-studio-2013-web-application-project-to-discountasp_net-server.aspx 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 10, 2015 12:08 AM
  • User747696199 posted

    Can I just edit the .csproj file on the server? Would that work?

    Thanks,

    Claudia

    Tuesday, November 10, 2015 12:12 AM
  • User1992938117 posted

    Can I just edit the .csproj file on the server? Would that work?

    No, Until you rebuild the associated projects

    Tuesday, November 10, 2015 12:24 AM
  • User747696199 posted

    Thanks raj.<br>
    <br>
    what I don't understand is: the .csproj file is XML, just like web.config file, so why can't i edit it on the fly?<br>
    <br>
    can you please elaborate. Has anyone tried this? <br>
    <br>
    thanks, <br>
    Claudia
    Tuesday, November 10, 2015 1:56 AM
  • User1992938117 posted

    The references you will add in csproj files will be required/used while compiled that project.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 10, 2015 2:25 AM
  • User-821857111 posted

    The csproj file is not part of the deployed application like the web.config. It is used by the build system. Therefore if you make changes to it, they will only take effect if you rebuild the application.

    http://www.asp.net/web-forms/overview/deployment/web-deployment-in-the-enterprise/understanding-the-project-file

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 10, 2015 2:34 AM
  • User747696199 posted

    Thanks everyone.

    We ended up re-compiled and re-deployed - and it worked.

    Thanks a lot,

    Claudia

    Thursday, November 12, 2015 11:17 AM