none
VS 2008 adds strange lines to my C# project file when upgrading from VS 2005

    Question

  • I am in the process of upgrading all my VS 2005 C# projects to VS 2008.  I have VS 2008 Team Developer edition with SP1 installed.  I open each project in VS 2008 and go through the wizard and have experienced no errors.  For most projects, VS changes only a couple of lines in the csproj file and adds a line: <OldToolsVersion>2.0</OldToolsVersion>.  However, I have had 2 projects where VS adds these lines too:

        <PublishUrl>http://localhost/CompanyName.ResourceFile/</PublishUrl> 
        <Install>true</Install> 
        <InstallFrom>Web</InstallFrom> 
        <UpdateEnabled>true</UpdateEnabled> 
        <UpdateMode>Foreground</UpdateMode> 
        <UpdateInterval>7</UpdateInterval> 
        <UpdateIntervalUnits>Days</UpdateIntervalUnits> 
        <UpdatePeriodically>false</UpdatePeriodically> 
        <UpdateRequired>false</UpdateRequired> 
        <MapFileExtensions>true</MapFileExtensions> 
        <ApplicationRevision>0</ApplicationRevision> 
        <ApplicationVersion>1.0.0.%2a</ApplicationVersion> 
        <IsWebBootstrapper>true</IsWebBootstrapper> 
        <UseApplicationTrust>false</UseApplicationTrust> 
        <BootstrapperEnabled>true</BootstrapperEnabled> 

    and these too:

      <ItemGroup> 
        <BootstrapperPackage Include="Microsoft.Net.Client.3.5">  
          <Visible>False</Visible> 
          <ProductName>.NET Framework Client Profile</ProductName> 
          <Install>false</Install> 
        </BootstrapperPackage> 
        <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">  
          <Visible>False</Visible> 
          <ProductName>.NET Framework 2.0 %28x86%29</ProductName> 
          <Install>true</Install> 
        </BootstrapperPackage> 
        <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">  
          <Visible>False</Visible> 
          <ProductName>.NET Framework 3.0 %28x86%29</ProductName> 
          <Install>false</Install> 
        </BootstrapperPackage> 
        <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">  
          <Visible>False</Visible> 
          <ProductName>.NET Framework 3.5</ProductName> 
          <Install>false</Install> 
        </BootstrapperPackage> 
        <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">  
          <Visible>False</Visible> 
          <ProductName>.NET Framework 3.5 SP1</ProductName> 
          <Install>false</Install> 
        </BootstrapperPackage> 
      </ItemGroup> 

    What things in my VS 2005 C# project would cause VS 2008 to add these lines?  My project has been around for several years.  I don't think that I ever tried adding Bootstrapper or Deployment functionality to the project in the past.

    Thanks,
    Brad
    Tuesday, October 28, 2008 1:11 PM

Answers

  • You could temporarily change the output type of your application to Console Application, then close and reopen the properties.  From there you could access the Publish tab.  I'm not exactly sure why you're concerned about these properties anyways.  They shouldn't affect the compiling of your assemblies at all.  As these settings are only used for ClickOnce, you should be able to leave these settings in the csproj file with no issues.


    David Morton - http://blog.davemorton.net/
    • Marked as answer by Brad456 Tuesday, October 28, 2008 6:51 PM
    • Unmarked as answer by Brad456 Tuesday, October 28, 2008 6:52 PM
    • Proposed as answer by Harry Zhu Friday, October 31, 2008 4:44 AM
    • Marked as answer by Brad456 Friday, October 31, 2008 2:52 PM
    • Marked as answer by Brad456 Friday, October 31, 2008 2:52 PM
    • Marked as answer by Brad456 Friday, October 31, 2008 2:52 PM
    • Marked as answer by Brad456 Friday, October 31, 2008 2:52 PM
    Tuesday, October 28, 2008 2:48 PM

All replies

  • You edited something on the ClickOnce tab in Properties.  You didn't necessarily release it that way, but simply changing something in the ClickOnce page on the properties window can cause these settings to appear in the csproj.


    David Morton - http://blog.davemorton.net/
    • Proposed as answer by Harry Zhu Friday, October 31, 2008 4:44 AM
    Tuesday, October 28, 2008 1:22 PM
  • Thanks, but where are the ClickOnce properties that I need to check?  This project is a Windows DLL project.  When I click the Signing tab, I see "Sign the ClickOnce manifests", but everything's disabled.  I can't change anything there.  (I have the "Sign the assembly" option checked with our snk file selected.)

    For Windows App projects, I can view properties, and it has a Publish tab with publishing settings.  But for this DLL project, there is no Publish tab.  Where else should I look?

    -Brad
    Tuesday, October 28, 2008 2:43 PM
  • You could temporarily change the output type of your application to Console Application, then close and reopen the properties.  From there you could access the Publish tab.  I'm not exactly sure why you're concerned about these properties anyways.  They shouldn't affect the compiling of your assemblies at all.  As these settings are only used for ClickOnce, you should be able to leave these settings in the csproj file with no issues.


    David Morton - http://blog.davemorton.net/
    • Marked as answer by Brad456 Tuesday, October 28, 2008 6:51 PM
    • Unmarked as answer by Brad456 Tuesday, October 28, 2008 6:52 PM
    • Proposed as answer by Harry Zhu Friday, October 31, 2008 4:44 AM
    • Marked as answer by Brad456 Friday, October 31, 2008 2:52 PM
    • Marked as answer by Brad456 Friday, October 31, 2008 2:52 PM
    • Marked as answer by Brad456 Friday, October 31, 2008 2:52 PM
    • Marked as answer by Brad456 Friday, October 31, 2008 2:52 PM
    Tuesday, October 28, 2008 2:48 PM
  • I did your suggestion, changed the output type to Console App, and looked at the Publish tab.  None of the settings appeared out of the ordinary.

    Thanks for your help.  You're right.  I shouldn't worry about these new lines in the csproj file.  The projects compile fine.  I just wanted to understand why they were added to a couple of my project files and not the rest.

    Regards,
    Brad

    Tuesday, October 28, 2008 6:59 PM