0

我有Authenticate带有以下配置文件的 ac# 项目,它正在尝试使用.Net 2.0任何 CPU 的目标框架进行编译,它不断生成.Net 3.5dll 而不是.Net 2.0(使用 dotPeek 反编译的 dll)

下面是我的Authenticate.csproj

<VisualStudioProject>
    <CSHARP
        ProjectType = "Local"
        ProductVersion = "7.0.9466"
        SchemaVersion = "1.0"
        ProjectGuid = "{DAB9C947-0D3D-416A-A3B4-6DDE536FB208}"
        SccProjectName = "SAK"
        SccLocalPath = "SAK"
        SccAuxPath = "SAK"
        SccProvider = "SAK"
    >
        <Build>
            <Settings
                ApplicationIcon = ""
                AssemblyKeyContainerName = ""
                AssemblyName = "Authenticate"
                AssemblyOriginatorKeyFile = ""
                DefaultClientScript = "JScript"
                DefaultHTMLPageLayout = "Grid"
                DefaultTargetSchema = "IE50"
                DelaySign = "false"
                OutputType = "Library"
                RootNamespace = "Authenticate"
                StartupObject = ""
            >
                <Config
                    Name = "Debug"
                    AllowUnsafeBlocks = "false"
                    BaseAddress = "285212672"
                    CheckForOverflowUnderflow = "false"
                    ConfigurationOverrideFile = ""
                    DefineConstants = "DEBUG;TRACE"
                    DocumentationFile = ""
                    DebugSymbols = "true"
                    FileAlignment = "4096"
                    IncrementalBuild = "true"
                    Optimize = "false"
                    OutputPath = "bin\Debug\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "4"
                />
                <Config
                    Name = "Release"
                    AllowUnsafeBlocks = "false"
                    BaseAddress = "285212672"
                    CheckForOverflowUnderflow = "false"
                    ConfigurationOverrideFile = ""
                    DefineConstants = "TRACE"
                    DocumentationFile = ""
                    DebugSymbols = "false"
                    FileAlignment = "4096"
                    IncrementalBuild = "false"
                    Optimize = "true"
                    OutputPath = "bin\Release\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "4"
                />
            </Settings>
            <References>
                <Reference
                    Name = "System"
                    AssemblyName = "System"
                    HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll"
                />
                <Reference
                    Name = "System.Data"
                    AssemblyName = "System.Data"
                    HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"
                />
                <Reference
                    Name = "System.XML"
                    AssemblyName = "System.Xml"
                    HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
                />
                <Reference
                    Name = "System.Web"
                    AssemblyName = "System.Web"
                    HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Web.dll"
                />
                <Reference
                    Name = "DataCertSettings"
                    AssemblyName = "DataCertSettings"
                    HintPath = "..\..\..\..\..\..\POC\bin\Client\Settings.dll"
                />
                <Reference
                    Name = "CertUtil"
                    AssemblyName = "CertUtil"
                    HintPath = "..\..\..\..\..\..\POC\bin\Client\CertUtil.dll"
                />
            </References>
        </Build>
        <Files>
            <Include>
                <File
                    RelPath = "AssemblyInfo.cs"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "AuthenticateModule.cs"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
            </Include>
        </Files>
    </CSHARP>
</VisualStudioProject>

下面是我的Authenticate.sln

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Web Developer Express 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticate", "Authenticate.csproj", "{DAB9C947-0D3D-416A-A3B4-6DDE536FB208}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {DAB9C947-0D3D-416A-A3B4-6DDE536FB208}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {DAB9C947-0D3D-416A-A3B4-6DDE536FB208}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {DAB9C947-0D3D-416A-A3B4-6DDE536FB208}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {DAB9C947-0D3D-416A-A3B4-6DDE536FB208}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
EndGlobal

我尝试使用 VS2010、VS2013 和 VS2017 编译项目。我看到.Net 3.5生成相同的 dll 而不是.Net 2.0. 有人可以帮我生成.Net 2.0dll吗?

4

0 回答 0