无法在 VS 2022 或 2019 中打开 Sql 数据库项目

问题描述 投票:0回答:1

我有 VS.Net 解决方案,其中有多个项目,所有项目都可以正常打开,但是我们有 SQL 文件的 SQL 项目没有打开,如果我尝试在 VS 2022 中打开它,它会给我以下内容错误信息

导入的项目“C:\Program Files\Microsoft Visual Studio�2\Enterprise\MSBuild\Microsoft\VisualStudio 12.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" 没找到。另外,试图找到 “Microsoft\VisualStudio 12.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets” 在 $(MSBuildExtensionsPath) 的后备搜索路径中 - “C:\Program Files (x86)\MSBuild”。这些搜索路径定义在 “C:\ Users \ devadminam \ AppData \ Local \ Microsoft \ VisualStudio .0_6d8b140c \ devenv.exe.config”。 确认声明中的路径正确,并且 该文件存在于磁盘上的搜索路径之一中。 C:\SourceCode\Reporting Media Services Dev\Source\WSD 正文 正文_第3212章

当我尝试在 VS 2019 中打开它时,它给出以下错误消息

C:\SourceCode\Reporting Media Services Dev\Source\WSD 正文 正文_第3212章 : 错误 : 导入的项目“C:\Program Files (x86)\Microsoft 视觉的 Studio�9\Enterprise\MSBuild\Microsoft\VisualStudio 12.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" 没找到。另外,试图找到 “Microsoft\VisualStudio 12.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets” 在 $(MSBuildExtensionsPath) 的后备搜索路径中 - “C:\Program Files (x86)\MSBuild”。这些搜索路径定义在 “C:\Users\devadminam\AppData\Local\Microsoft\VisualStudio .0_5464bbaa\devenv.exe.config”。 确认声明中的路径正确,并且 该文件存在于磁盘上的搜索路径之一中。 C:\SourceCode\Reporting Media Services Dev\Source\WSD 正文 正文_第3212章

无法弄清楚我犯了什么错误,之前它打开得很好,有一段时间我忙于其他事情,它开始给我上面的错误。

db工程文件如下

<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <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> <Name>CalSTRS.Services.RptMedia.Database</Name> <SchemaVersion>2.0</SchemaVersion> <ProjectVersion>4.1</ProjectVersion> <ProjectGuid>{6e64f941-bf54-41f6-be0b-a178c3b692f9}</ProjectGuid> <DSP>Microsoft.Data.Tools.Schema.Sql.Sql120DatabaseSchemaProvider</DSP> <OutputType>Database</OutputType> <RootPath> </RootPath> <RootNamespace>CalSTRS.Services.RptMedia.Database</RootNamespace> <AssemblyName>CalSTRS.Services.RptMedia.Database</AssemblyName> <ModelCollation>1033, CI</ModelCollation> <DefaultFileStructure>BySchemaAndSchemaType</DefaultFileStructure> <DeployToDatabase>True</DeployToDatabase> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetLanguage>CS</TargetLanguage> <AppDesignerFolder>Properties</AppDesignerFolder> <SqlServerVerification>False</SqlServerVerification> <IncludeCompositeObjects>True</IncludeCompositeObjects> <TargetDatabaseSet>True</TargetDatabaseSet> <SccProjectName>SAK</SccProjectName> <SccProvider>SAK</SccProvider> <SccAuxPath>SAK</SccAuxPath> <SccLocalPath>SAK</SccLocalPath> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <OutputPath>bin\Release\</OutputPath> <BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName> <TreatWarningsAsErrors>False</TreatWarningsAsErrors> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <DefineDebug>false</DefineDebug> <DefineTrace>true</DefineTrace> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <OutputPath>bin\Debug\</OutputPath> <BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName> <TreatWarningsAsErrors>false</TreatWarningsAsErrors> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion> <!-- Default to the v11.0 targets path if the targets file for the current VS version is not found --> <SSDTExists Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets')">True</SSDTExists> <VisualStudioVersion Condition="'$(SSDTExists)' == ''">11.0</VisualStudioVersion> </PropertyGroup> <Import Condition="'$(SQLDBExtensionsRefPath)' != ''" Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.SqlTasks.targets" /> <Import Condition="'$(SQLDBExtensionsRefPath)' == ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v12.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" /> <ItemGroup> <Folder Include="Properties" /> <Folder Include="bin" /> <Folder Include="bin\Debug" /> <Folder Include="dbo" /> <Folder Include="dbo\Functions" /> <Folder Include="dbo\Stored Procedures" /> <Folder Include="dbo\Tables" /> <Folder Include="dbo\Views" /> <Folder Include="Import Schema Logs" /> <Folder Include="obj" /> <Folder Include="obj\Debug" /> <Folder Include="Security" /> </ItemGroup> <ItemGroup> <None Include="bin\Debug\CalSTRS.Services.RptMedia.Database.dacpac" /> <None Include="bin\Debug\CalSTRS.Services.RptMedia.Database.dll" /> <None Include="bin\Debug\CalSTRS.Services.RptMedia.Database.pdb" /> <None Include="Import Schema Logs\CalSTRS.Services.Rpt_20161017104151.log" /> <None Include="obj\Debug\CalSTRS.Services.RptMedia.Database.dll" /> <None Include="obj\Debug\CalSTRS.Services.RptMedia.Database.pdb" /> <None Include="obj\Debug\CalSTRS.Services.RptMedia.Database.sqlproj.FileListAbsolute.txt" /> <None Include="obj\Debug\Model.xml" /> </ItemGroup> <ItemGroup> <Build Include="dbo\Functions\SfnCompareFilterPermissions.sql" /> <Build Include="dbo\Functions\SfnDecodeSignedNumeric.sql" /> <Build Include="dbo\Functions\SfnEditCanBeEmployerApprovable.sql" /> <Build Include="dbo\Functions\SfnEditRunEditIsEmployerApprovable.sql" /> <Build Include="dbo\Functions\SfnEmployerApprovedEditsExistForFileLineDetail.sql" /> <Build Include="dbo\Functions\SfnEmployerApprovedEditsExistForFileLineDetailAndEdit.sql" /> </ItemGroup> </Project>

我有如下的解决方案文件

Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.10.35013.160 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{38758AFE-4B04-4168-922B-6FA683555A12}" ProjectSection(SolutionItems) = preProject localtestrun.testrunconfig = localtestrun.testrunconfig Reporting Media Services.vsmdi = Reporting Media Services.vsmdi EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalSTRS.Services.RptMedia", "CalSTRS.Services.RptMedia\CalSTRS.Services.RptMedia.csproj", "{4A7D1AB9-5DDD-4FFD-B2E1-723C4207B611}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalSTRS.Services.RptMedia.Business", "CalSTRS.Services.RptMedia.Business\CalSTRS.Services.RptMedia.Business.csproj", "{52573895-33E4-49B1-BEF2-5F6926A16890}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalSTRS.Services.RptMedia.Data", "CalSTRS.Services.RptMedia.Data\CalSTRS.Services.RptMedia.Data.csproj", "{D4805742-D470-42B2-AF42-1FEA695E4872}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalSTRS.Services.RptMedia.Data.Start", "CalSTRS.Services.RptMedia.Data.Start\CalSTRS.Services.RptMedia.Data.Start.csproj", "{73899FA3-25AF-432B-A3DF-04E8DE77BC78}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalSTRS.Services.RptMedia.Entity", "CalSTRS.Services.RptMedia.Entity\CalSTRS.Services.RptMedia.Entity.csproj", "{1140E470-5876-4AAB-9E1C-39B7A226B392}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalSTRS.Services.RptMedia.ServiceHelper", "CalSTRS.Services.RptMedia.ServiceHelper\CalSTRS.Services.RptMedia.ServiceHelper.csproj", "{4D611562-B4DB-4817-857A-B9F2954A425B}" ProjectSection(ProjectDependencies) = postProject {271BF624-FA12-4558-87D2-8606EC5EC5BC} = {271BF624-FA12-4558-87D2-8606EC5EC5BC} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication", "ConsoleApplication\ConsoleApplication.csproj", "{041A8C27-E86E-4255-A643-6C0FC1C6A530}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalSTRS.Services.RptMedia.Utility", "CalSTRS.Services.RptMedia.Utility\CalSTRS.Services.RptMedia.Utility.csproj", "{FCB4D741-E36F-4505-9CB5-B4B4087E5319}" EndProject Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "Database", "Database\Database.sqlproj", "{4B85C4ED-8DE8-4B89-9045-462DE5AC1E88}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransferFilesToNetworkService", "TransferFilesToNetworkService\TransferFilesToNetworkService.csproj", "{5C436A63-7D49-4311-8783-332680038E46}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransferFilesToNetwork", "TransferFilesToNetwork\TransferFilesToNetwork.csproj", "{706022B6-05EF-48D0-B836-818A2299733F}" EndProject Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "CalSTRSRptMediaServices", "http://localhost/CalSTRSRptMediaServices", "{271BF624-FA12-4558-87D2-8606EC5EC5BC}" ProjectSection(WebsiteProperties) = preProject SccProjectName = "SAK" SccAuxPath = "SAK" SccLocalPath = "SAK" SccProvider = "SAK" UseIISExpress = "false" TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.7.2" ProjectReferences = "{52573895-33E4-49B1-BEF2-5F6926A16890}|CalSTRS.Services.RptMedia.Business.dll;{D4805742-D470-42B2-AF42-1FEA695E4872}|CalSTRS.Services.RptMedia.Data.dll;{73899FA3-25AF-432B-A3DF-04E8DE77BC78}|CalSTRS.Services.RptMedia.Data.Start.dll;{4A7D1AB9-5DDD-4FFD-B2E1-723C4207B611}|CalSTRS.Services.RptMedia.dll;{1140E470-5876-4AAB-9E1C-39B7A226B392}|CalSTRS.Services.RptMedia.Entity.dll;{FCB4D741-E36F-4505-9CB5-B4B4087E5319}|CalSTRS.Services.RptMedia.Utility.dll;" Debug.AspNetCompiler.VirtualPath = "/CalSTRSRptMediaServices" Debug.AspNetCompiler.PhysicalPath = "CalSTRSRptMediaServices\" Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\CalSTRSRptMediaServices\" Debug.AspNetCompiler.Updateable = "true" Debug.AspNetCompiler.ForceOverwrite = "true" Debug.AspNetCompiler.FixedNames = "false" Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.VirtualPath = "/CalSTRSRptMediaServices" Release.AspNetCompiler.PhysicalPath = "CalSTRSRptMediaServices\" Release.AspNetCompiler.TargetPath = "PrecompiledWeb\CalSTRSRptMediaServices\" Release.AspNetCompiler.Updateable = "true" Release.AspNetCompiler.ForceOverwrite = "true" Release.AspNetCompiler.FixedNames = "false" Release.AspNetCompiler.Debug = "False" SlnRelativePath = "CalSTRSRptMediaServices\" EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalSTRS.Services.RptMedia.Test", "CalSTRS.Services.RptMedia.Test\CalSTRS.Services.RptMedia.Test.csproj", "{F7AF0CB9-F06C-4B72-950C-B1A2D58A7EEE}" EndProject Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "CalSTRS.Services.RptMedia.Database", "CalSTRS.Services.RptMedia.Database\CalSTRS.Services.RptMedia.Database.sqlproj", "{6E64F941-BF54-41F6-BE0B-A178C3B692F9}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_build", "_build", "{D6E2CEB1-EBA9-413C-99B0-D7997572431E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NugetPackageRptMedia", "NugetPackageRptMedia\NugetPackageRptMedia.csproj", "{15BF3989-39D3-4327-8198-6C8DCA897F7A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|.NET = Debug|.NET Debug|Any CPU = Debug|Any CPU Debug|Mixed Platforms = Debug|Mixed Platforms Debug|x86 = Debug|x86 DemoMode|.NET = DemoMode|.NET DemoMode|Any CPU = DemoMode|Any CPU DemoMode|Mixed Platforms = DemoMode|Mixed Platforms DemoMode|x86 = DemoMode|x86 Development|.NET = Development|.NET Development|Any CPU = Development|Any CPU Development|Mixed Platforms = Development|Mixed Platforms Development|x86 = Development|x86 Release|.NET = Release|.NET Release|Any CPU = Release|Any CPU Release|Mixed Platforms = Release|Mixed Platforms Release|x86 = Release|x86 SingleProjectDebug|.NET = SingleProjectDebug|.NET SingleProjectDebug|Any CPU = SingleProjectDebug|Any CPU SingleProjectDebug|Mixed Platforms = SingleProjectDebug|Mixed Platforms SingleProjectDebug|x86 = SingleProjectDebug|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {15BF3989-39D3-4327-8198-6C8DCA897F7A} = {D6E2CEB1-EBA9-413C-99B0-D7997572431E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6D6D6F8F-5638-415F-BF47-D0481A83CC83} EndGlobalSection GlobalSection(TeamFoundationVersionControl) = preSolution SccNumberOfProjects = 16 SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} SccTeamFoundationServer = http://tfs:8080/tfs/calstrsappcollection SccLocalPath0 = . SccProjectUniqueName1 = CalSTRS.Services.RptMedia.Business\\CalSTRS.Services.RptMedia.Business.csproj SccProjectName1 = CalSTRS.Services.RptMedia.Business SccLocalPath1 = CalSTRS.Services.RptMedia.Business SccLocalPath4 = CalSTRS.Services.RptMedia.Entity SccProjectUniqueName5 = CalSTRS.Services.RptMedia.ServiceHelper\\CalSTRS.Services.RptMedia.ServiceHelper.csproj SccProjectName5 = CalSTRS.Services.RptMedia.ServiceHelper SccLocalPath5 = CalSTRS.Services.RptMedia.ServiceHelper SccProjectUniqueName6 = CalSTRS.Services.RptMedia.Utility\\CalSTRS.Services.RptMedia.Utility.csproj SccProjectName6 = CalSTRS.Services.RptMedia.Utility SccLocalPath6 = CalSTRS.Services.RptMedia.Utility SccProjectUniqueName7 = CalSTRS.Services.RptMedia\\CalSTRS.Services.RptMedia.csproj SccProjectName7 = CalSTRS.Services.RptMedia SccLocalPath7 = CalSTRS.Services.RptMedia SccProjectUniqueName8 = ConsoleApplication\\ConsoleApplication.csproj SccProjectName8 = ConsoleApplication SccLocalPath8 = ConsoleApplication SccProjectUniqueName9 = TransferFilesToNetwork\\TransferFilesToNetwork.csproj SccProjectName9 = TransferFilesToNetwork SccLocalPath9 = TransferFilesToNetwork SccProjectUniqueName10 = TransferFilesToNetworkService\\TransferFilesToNetworkService.csproj SccProjectName10 = TransferFilesToNetworkService SccLocalPath10 = TransferFilesToNetworkService SccProjectUniqueName11 = CalSTRS.Services.RptMedia.Test\\CalSTRS.Services.RptMedia.Test.csproj SccProjectName11 = CalSTRS.Services.RptMedia.Test SccLocalPath11 = CalSTRS.Services.RptMedia.Test SccProjectUniqueName12 = Database\\Database.sqlproj SccProjectName12 = Database SccLocalPath12 = Database SccProjectUniqueName13 = CalSTRS.Services.RptMedia.Database\\CalSTRS.Services.RptMedia.Database.sqlproj SccProjectName13 = CalSTRS.Services.RptMedia.Database SccLocalPath13 = CalSTRS.Services.RptMedia.Database SccProjectUniqueName14 = NugetPackageRptMedia\\NugetPackageRptMedia.csproj SccProjectTopLevelParentUniqueName14 = Reporting\u0020Media\u0020Services.sln SccProjectName14 = NugetPackageRptMedia SccLocalPath14 = NugetPackageRptMedia SccWebProject15 = true SccProjectUniqueName15 = http://localhost/CalSTRSRptMediaServices SccProjectName15 = CalSTRSRptMediaServices SccLocalPath15 = CalSTRSRptMediaServices SccProjectEnlistmentChoice15 = 2 EndGlobalSection EndGlobal

有人可以帮我解决我的项目或解决方案中的问题吗,非常感谢。我尝试通过删除一些细节来减少帖子大小,如果您觉得需要,我可以提供。如果该项目可以在 2019 年或 2022 年开放,任何人的环境都可以。非常感谢。

asp.net-mvc visual-studio visual-studio-2019 visual-studio-2022 sql-server-data-tools
1个回答
0
投票

C:\Program Files\Microsoft Visual Studio�2\Enterprise\MSBuild\Microsoft\VisualStudio 17.0\SSDT

如果有人需要帮助

© www.soinside.com 2019 - 2024. All rights reserved.