none
New VSTO project is incompatible when reopened RRS feed

  • Question

  • Hi!

    I just created a new VSTO Excel 2010 Workbook project using vs2012. Saved it, closed it and then tried to reopen it. But when I do it fails to load and says the solution contains an incompatible project.

    What's going on?

    /Måns

    Tuesday, January 29, 2013 10:33 PM

Answers

All replies

  • can you reproduce the issue anew from start (creating new project, etc.)?
    Wednesday, January 30, 2013 7:48 AM
  • Yes, it is easily reproduced. In vs2010 it works fine though.

    Wednesday, January 30, 2013 8:47 AM
  • sorry, cannot reproduce your problem. Please edit your csproj in notepad and paste here whole project group section
    Wednesday, January 30, 2013 9:24 AM
  • <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
      <PropertyGroup>
        <ProjectTypeGuids>{BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
        <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
        <OutputType>Library</OutputType>
        <NoStandardLibraries>false</NoStandardLibraries>
        <RootNamespace>ExcelWorkbook</RootNamespace>
        <AssemblyName>ExcelWorkbook</AssemblyName>
        <VSTO_HostDocumentName>ExcelWorkbook.xlsx</VSTO_HostDocumentName>
        <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
        <DefineConstants>VSTO40</DefineConstants>
        <OfficeApplication>Excel</OfficeApplication>
        <BootstrapperEnabled>true</BootstrapperEnabled>
        <BootstrapperComponentsLocation>HomeSite</BootstrapperComponentsLocation>
        <ProjectGuid>{3C221D59-214E-42C0-8C61-52147168DBE5}</ProjectGuid>
      </PropertyGroup>
      <ItemGroup>
        <BootstrapperPackage Include=".NETFramework,Version=v4.0">
          <Visible>False</Visible>
          <ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
          <Install>true</Install>
        </BootstrapperPackage>
        <BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
          <Visible>False</Visible>
          <ProductName>Windows Installer 4.5</ProductName>
          <Install>true</Install>
        </BootstrapperPackage>
      </ItemGroup>
      <PropertyGroup>
        <VSTO_EmbedTypeLibraryInAssembly>false</VSTO_EmbedTypeLibraryInAssembly>
      </PropertyGroup>
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
        <DebugSymbols>true</DebugSymbols>
        <DebugType>full</DebugType>
        <Optimize>false</Optimize>
        <OutputPath>bin\Debug\</OutputPath>
        <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
        <DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
        <WarningLevel>4</WarningLevel>
      </PropertyGroup>
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
        <DebugType>pdbonly</DebugType>
        <Optimize>true</Optimize>
        <OutputPath>bin\Release\</OutputPath>
        <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
        <DefineConstants>$(DefineConstants);TRACE</DefineConstants>
        <WarningLevel>4</WarningLevel>
      </PropertyGroup>
      <!--
        This section specifies references for the project.
      -->
      <ItemGroup>
        <Reference Include="System" />
        <Reference Include="System.Data" />
        <Reference Include="System.Drawing" />
        <Reference Include="System.Windows.Forms" />
        <Reference Include="System.Xml" />
        <Reference Include="System.Core" />
        <Reference Include="System.Xml.Linq" />
        <Reference Include="System.Data.DataSetExtensions" />
        <Reference Include="Microsoft.CSharp" />
      </ItemGroup>
      <ItemGroup>
        <Reference Include="Microsoft.Office.Tools.v4.0.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
        <Reference Include="Microsoft.VisualStudio.Tools.Applications.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
        <Reference Include="Microsoft.Office.Tools, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
        <Reference Include="Microsoft.Office.Tools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
        <Reference Include="Microsoft.Office.Tools.Excel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
      </ItemGroup>
      <ItemGroup>
        <Reference Include="Microsoft.Office.Tools.Common.v4.0.Utilities, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
          <Private>True</Private>
        </Reference>
        <Reference Include="Microsoft.Office.Tools.Excel.v4.0.Utilities, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
          <Private>True</Private>
        </Reference>
      </ItemGroup>
      <ItemGroup>
        <Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
          <Private>False</Private>
        </Reference>
        <Reference Include="Office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
          <Private>False</Private>
          <EmbedInteropTypes>true</EmbedInteropTypes>
        </Reference>
        <Reference Include="Microsoft.Vbe.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
          <Private>False</Private>
          <EmbedInteropTypes>true</EmbedInteropTypes>
        </Reference>
        <Reference Include="Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
          <Private>False</Private>
          <EmbedInteropTypes>true</EmbedInteropTypes>
        </Reference>
      </ItemGroup>
      <ItemGroup>
        <Compile Include="Properties\AssemblyInfo.cs" />
        <Compile Include="Sheet1.cs">
          <DependentUpon>ExcelWorkbook.xlsx</DependentUpon>
        </Compile>
        <Compile Include="Sheet1.Designer.cs">
          <DependentUpon>Sheet1.Designer.xml</DependentUpon>
        </Compile>
        <Compile Include="Sheet2.cs">
          <DependentUpon>ExcelWorkbook.xlsx</DependentUpon>
        </Compile>
        <Compile Include="Sheet2.Designer.cs">
          <DependentUpon>Sheet2.Designer.xml</DependentUpon>
        </Compile>
        <Compile Include="Sheet3.cs">
          <DependentUpon>ExcelWorkbook.xlsx</DependentUpon>
        </Compile>
        <Compile Include="Sheet3.Designer.cs">
          <DependentUpon>Sheet3.Designer.xml</DependentUpon>
        </Compile>
        <Compile Include="ThisWorkbook.cs">
          <DependentUpon>ExcelWorkbook.xlsx</DependentUpon>
        </Compile>
        <Compile Include="ThisWorkbook.Designer.cs">
          <DependentUpon>ThisWorkbook.Designer.xml</DependentUpon>
        </Compile>
        <EmbeddedResource Include="Properties\Resources.resx">
          <Generator>ResXFileCodeGenerator</Generator>
          <LastGenOutput>Resources.Designer.cs</LastGenOutput>
          <SubType>Designer</SubType>
        </EmbeddedResource>
        <Compile Include="Properties\Resources.Designer.cs">
          <AutoGen>True</AutoGen>
          <DependentUpon>Resources.resx</DependentUpon>
        </Compile>
        <None Include="ExcelWorkbook.xlsx" />
        <None Include="Properties\Settings.settings">
          <Generator>SettingsSingleFileGenerator</Generator>
          <LastGenOutput>Settings.Designer.cs</LastGenOutput>
        </None>
        <Compile Include="Properties\Settings.Designer.cs">
          <AutoGen>True</AutoGen>
          <DependentUpon>Settings.settings</DependentUpon>
          <DesignTimeSharedInput>True</DesignTimeSharedInput>
        </Compile>
      </ItemGroup>
      <ItemGroup>
        <None Include="ThisWorkbook.Designer.xml">
          <DependentUpon>ThisWorkbook.cs</DependentUpon>
        </None>
      </ItemGroup>
      <ItemGroup>
        <None Include="Sheet1.Designer.xml">
          <DependentUpon>Sheet1.cs</DependentUpon>
        </None>
      </ItemGroup>
      <ItemGroup>
        <None Include="Sheet2.Designer.xml">
          <DependentUpon>Sheet2.cs</DependentUpon>
        </None>
      </ItemGroup>
      <ItemGroup>
        <None Include="Sheet3.Designer.xml">
          <DependentUpon>Sheet3.cs</DependentUpon>
        </None>
      </ItemGroup>
      <PropertyGroup>
        <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
        <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
      </PropertyGroup>
      <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
      <Import Project="$(VSToolsPath)\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets" Condition="'$(VSToolsPath)' != ''" />
      <ProjectExtensions>
        <VisualStudio>
          <FlavorProperties GUID="{BAA0C2D2-18E2-41B9-852F-F413020CAA33}">
            <ProjectProperties HostName="ExcelWorkbook.xlsx" HostPackage="{825100CF-0BA7-47EA-A084-DCF3308DAF74}" OfficeVersion="14.0" VstxVersion="4.0" ApplicationType="XLS" Language="CS" TemplatesPath="VSTOTemplates" DebugInfoExeName="C:\Program Files (x86)\Microsoft Office\Office14\Excel.exe" DebugInfoCommandLine="&quot;[$OUTPUT]ExcelWorkbook.xlsx&quot;" />
            <Host Name="Excel Document" Path=".\ExcelWorkbook.xlsx" GeneratedCodeNamespace="ExcelWorkbook">
              <HostItem Name="Sheet1" Code="Sheet1.cs" CanonicalName="Sheet1" DisplayName="Sheet1" Blueprint="Sheet1.Designer.xml" GeneratedCode="Sheet1.Designer.cs" />
              <HostItem Name="Sheet2" Code="Sheet2.cs" CanonicalName="Sheet2" DisplayName="Sheet2" Blueprint="Sheet2.Designer.xml" GeneratedCode="Sheet2.Designer.cs" />
              <HostItem Name="Sheet3" Code="Sheet3.cs" CanonicalName="Sheet3" DisplayName="Sheet3" Blueprint="Sheet3.Designer.xml" GeneratedCode="Sheet3.Designer.cs" />
              <HostItem Name="ThisWorkbook" Code="ThisWorkbook.cs" CanonicalName="ThisWorkbook" Blueprint="ThisWorkbook.Designer.xml" GeneratedCode="ThisWorkbook.Designer.cs" />
            </Host>
          </FlavorProperties>
        </VisualStudio>
      </ProjectExtensions>
      <!--
        To modify your build process, add your task inside one of the targets below and uncomment it.
        Other similar extension points exist, see Microsoft.Common.targets.
      <Target Name="BeforeBuild">
      </Target>
      <Target Name="AfterBuild">
      </Target>
      -->
    </Project>

    Wednesday, January 30, 2013 1:31 PM
  • your project loads just fine on my machine. I'm sorry but i have no clue what might be wrong. Did you do office upgrade perhaps?
    Wednesday, January 30, 2013 1:39 PM
  • I have both office 2007 and 2010 installed. I dont think I've done any upgrades. Another interesting thing was that when I had vs2010 open with a fully functional VSTO project I couldn't even create a VSTO project in vs2012. As soon as I closed vs2010 though I could create the project in vs2012 but with the same result as before. That is, if I close and open again it fails.
    Wednesday, January 30, 2013 6:18 PM
  • so on a single machine you have office 2007 and 2010 installed side by side? i guess this might be the root cause
    Wednesday, January 30, 2013 7:14 PM
  • I uninstalled Office 2007, rebooted, started excel 2010 to make sure it worked but I still cannot open a VSTO project newly created with vs2012. I'll try to repair my Office 2010 installation to see if that makes a difference.
    Thursday, January 31, 2013 7:35 AM
  • try to repair both office 2010 and VS 2012 (in this order)
    Thursday, January 31, 2013 8:45 AM