Привет всем.
Помогите сориентироваться в правильном направлении для устранения проблемы
В солюшене (VS2017) есть проект VSIX-а. Все это добро успешно компилировалось из командной строки через msbuild.
-- настройка "Visual Studio 2017 Developer Command Prompt v15.9.11"
nuget restore lcpi.data.oledb.vs2017-n4_6_2.sln
msbuild lcpi.data.oledb.vs2017-n4_6_2.sln /t:Rebuild /p:Configuration=Debug /p:Platform="Any CPU" /fileLogger /fileLoggerParameters:LogFile=ntest\bin\_build_log\vs2017-n4_6_2__debug.log
После (я не уверен в этом) установки VS2019 компиляция проекта с VSIX (через msbuild) поломалась:
source\OleDbDataProvider_Package.cs(5,14): error CS0234: Тип или имя пространства имен "ComponentModel" не существует в пространстве имен "System" (возможно, отсутствует ссылка на сборку). [d:\Users\Dima\Work3\.NET\data.oledb.net\visual_studio\data\v2\vsix2\lcpi.vs.data.providers.oledb.v2.vsix.vs2017_n4_6_2-n4_6_2.csproj]
source\OleDbDataProvider_DataRegistrationAttribute.cs(12,68): error CS0234: Тип или имя пространства имен "VisualStudio" не существует в пространстве имен "Microsoft" (возможно, отсутствует ссылка на сборку). [d:\Users\Dima\Work3\.NET\data.oledb.net\visual_studio\data\v2\vsix2\lcpi.vs.data.providers.oledb.v2.vsix.vs2017_n4_6_2-n4_6_2.csproj]
source\OleDbDataProvider_Package.cs(57,14): error CS0234: Тип или имя пространства имен "VisualStudio" не существует в пространстве имен "Microsoft" (возможно, отсутствует ссылка на сборку). [d:\Users\Dima\Work3\.NET\data.oledb.net\visual_studio\data\v2\vsix2\lcpi.vs.data.providers.oledb.v2.vsix.vs2017_n4_6_2-n4_6_2.csproj]
OleDbDataProvider_Package.cs:
////////////////////////////////////////////////////////////////////////////////
//
//
using System;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
При этом —
проект нормально компилируется из IDE VS2017 и через devenv.exe из командной строки:
devenv lcpi.data.oledb.vs2017-n4_6_2.sln /Rebuild Debug
| Проектный файл |
| <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<UseCodebase>true</UseCodebase>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{5A459251-1680-4819-B056-B50127CD57F5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>lcpi.vs.data.providers.oledb.v2.vsix</RootNamespace>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<GeneratePkgDefFile>true</GeneratePkgDefFile>
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>true</IncludeDebugSymbolsInLocalVSIXDeployment>
<CopyBuildOutputToOutputDirectory>true</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>true</CopyOutputSymbolsToOutputDirectory>
<StartAction>Program</StartAction>
<StartProgram Condition="'$(DevEnvDir)' != ''">$(DevEnvDir)devenv.exe</StartProgram>
<StartArguments>/rootsuffix Exp</StartArguments>
<KeyContainerName>lcpi.net.code.keys</KeyContainerName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AssemblyName>lcpi.vs.data.providers.oledb.v2.integrator.vs2017-net4_5_0.net4_6_2.debug</AssemblyName>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\vs2017_net45.0-net46.2_Debug\</OutputPath>
<IntermediateOutputPath>obj\vs2017_net45.0-net46.2_Debug\</IntermediateOutputPath>
<DefineConstants>TRACE;DEBUG;BUILD_CONF__NET4_6_2;PROVIDER__NET4_5_0</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AssemblyName>lcpi.vs.data.providers.oledb.v2.integrator.vs2017-net4_5_0.net4_6_2</AssemblyName>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\vs2017_net45.0-net46.2_Release\</OutputPath>
<IntermediateOutputPath>obj\vs2017_net45.0-net46.2_Release\</IntermediateOutputPath>
<DefineConstants>BUILD_CONF__NET4_6_2;PROVIDER__NET4_5_0</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\..\..\Version\_version_info.cs">
<Link>Properties\_version_info.cs</Link>
</Compile>
<Compile Include="..\..\..\..\Version\lcpi_data_oledb_net__ver_info.cs">
<Link>Properties\lcpi_data_oledb_net__ver_info.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\AssemblyInfo_$(Configuration).cs" />
<Compile Include="source\core\Core_Trace.cs" />
<Compile Include="source\OleDbDataProvider_DataRegistrationAttribute.cs" />
<Compile Include="source\OleDbDataProvider_Package.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Preview.png">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Compile Include="..\vsix2-data\n4_5_0-n4_6_2-$(Configuration)\Core_Consts.cs">
<Link>source\core\Core_Consts.cs</Link>
</Compile>
<None Include="..\vsix2-data\n4_5_0-n4_6_2-$(Configuration)\source.extension.vsixmanifest">
<Link>source.extension.vsixmanifest</Link>
</None>
<Content Include="..\vsix2-data\n4_5_0-n4_6_2-$(Configuration)\VSPackage.ico">
<Link>VSPackage.ico</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<EmbeddedResource Include="..\vsix2-data\n4_5_0-n4_6_2-$(Configuration)\VSPackage.resx">
<Link>VSPackage.resx</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\vsix2-data\n4_5_0-n4_6_2-$(Configuration)\VSPackage.ru.resx">
<Link>VSPackage.ru.resx</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\code\lcpi.vs.data.providers.oledb.v2.vs2017_n4_5_0-n4_6_2.csproj">
<Project>{aeddea89-12dd-44ad-bfbf-2d1eb71e1b4f}</Project>
<Name>lcpi.vs.data.providers.oledb.v2.vs2017_n4_5_0-n4_6_2</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Shell.15.0">
<Version>15.8.28010</Version>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Threading">
<Version>15.8.168</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>11.0.2</Version>
</PackageReference>
<PackageReference Include="System.Configuration.ConfigurationManager">
<Version>4.5.0</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<Target Name="GetBuildVersion" Returns="$([System.Diagnostics.FileVersionInfo]::GetVersionInfo("$(TargetPath)").ProductVersion)" />
<!-- 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>
|
| |
Пробовал подключать к проекту System.ComponentModel (с nuget) — не помогает.
Короче — я в растерянности, куда копать?
-- Пользователи не приняли программу. Всех пришлось уничтожить. --