iam尝试使用msbuild在Visual Studio中构建没有问题的应用程序,但没有成功。
所有项目都使用4.5.1框架运行
这是.sln文件
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProgettoAttivitaDL", "ProgettoAttivitaDL\ProgettoAttivitaDL.csproj", "{E3F35A7C-1ADF-4FA9-B465-FE075B0EA16B}"EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProgettoAttivitaDAL", "ProgettoAttivitaDAL\ProgettoAttivitaDAL.csproj", "{C19E2178-4C17-4C3C-911C-C2F48737A085}"EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProgettoAttivitaBL", "ProgettoAttivitaBL\ProgettoAttivitaBL.csproj", "{7BDECFCB-680E-4041-89B5-7EFE17724BF0}"EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProgettoAttivitaCLI", "ProgettoAttivitaCLI\ProgettoAttivitaCLI.csproj", "{0ECD03D0-ED1B-46D0-9062-2D507F197456}"EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProgettoAttivitaCommons", "ProgettoAttivitaCommons\ProgettoAttivitaCommons.csproj", "{442ECAC8-D5E7-4AE6-BBA5-E1BBE5B8989C}"EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProgettoAttivita.UnitTest.BL", "ProgettoAttivita.UnitTest.BL\ProgettoAttivita.UnitTest.BL.csproj", "{8EDF4429-251A-416D-BB68-93F227191BCF}"EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Domain", "Domain", "{32D8B48D-9983-4F6A-A159-F0001291AE06}"EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain.Entity", "Domain\Domain.Entity\Domain.Entity.csproj", "{D76FECE0-2ECA-4DF1-AEFE-45058ADC7B6D}"EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Application", "Application", "{0287C9CE-18EC-4AA3-A953-3B279F699212}"EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application.DataAccess.NH", "Application\Application.DataAccess.NH\Application.DataAccess.NH.csproj", "{AF3B4AAF-CEC1-4221-912C-59D9BD03A933}"EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain.Interface", "Domain\Domain.Interface\Domain.Interface.csproj", "{9077F2DC-0736-4C8F-B047-125C9201F250}"EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{EC7B0687-17A1-4FF9-BF4E-DE8F358E1FB7}"EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.DataAccess.NH", "Test\Test.DataAccess.NH\Test.DataAccess.NH.csproj", "{FD57DE8B-6C74-4AE4-B9EA-555F99A46D79}"EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application.BusinessRule", "Application\Application.BusinessRule\Application.BusinessRule.csproj", "{BBD2EDFD-22FE-4935-ACCC-BF4504F22653}"EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.Domain.Entity", "Test\Test.Domain.Entity\Test.Domain.Entity.csproj", "{0DABDD3D-CF5D-45C8-AA4F-50189B1EDA77}"EndProject
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "ProgettoAttivitaWEB", "ProgettoAttivitaWEB\", "{9F56AE3A-6494-4FC1-A514-11C4DC8B571C}"
ProjectSection(WebsiteProperties) = preProject
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.5.1"
ProjectReferences = "{7BDECFCB-680E-4041-89B5-7EFE17724BF0}|ProgettoAttivitaBL.dll;{C19E2178-4C17-4C3C-911C-C2F48737A085}|ProgettoAttivitaDAL.dll;{E3F35A7C-1ADF-4FA9-B465-FE075B0EA16B}|ProgettoAttivitaDL.dll;{442ECAC8-D5E7-4AE6-BBA5-E1BBE5B8989C}|ProgettoAttivitaCommons.dll;{d76fece0-2eca-4df1-aefe-45058adc7b6d}|Domain.Entity.dll;{9077f2dc-0736-4c8f-b047-125c9201f250}|Domain.Interface.dll;{af3b4aaf-cec1-4221-912c-59d9bd03a933}|Application.DataAccess.NH.dll;"
Debug.AspNetCompiler.VirtualPath = "/ProgettoAttivitaWEB"
Debug.AspNetCompiler.PhysicalPath = "ProgettoAttivitaWEB\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\ProgettoAttivitaWEB\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/ProgettoAttivitaWEB"
Release.AspNetCompiler.PhysicalPath = "ProgettoAttivitaWEB\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\ProgettoAttivitaWEB\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "4086"
SlnRelativePath = "ProgettoAttivitaWEB\"
DefaultWebSiteLanguage = "Visual C#"
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|.NET = Debug|.NET
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Release|.NET = Release|.NET
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
//...
// Cut 120 row of debug and release option, all with AnyCPU
//...
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D76FECE0-2ECA-4DF1-AEFE-45058ADC7B6D} = {32D8B48D-9983-4F6A-A159-F0001291AE06}
{AF3B4AAF-CEC1-4221-912C-59D9BD03A933} = {0287C9CE-18EC-4AA3-A953-3B279F699212}
{9077F2DC-0736-4C8F-B047-125C9201F250} = {32D8B48D-9983-4F6A-A159-F0001291AE06}
{FD57DE8B-6C74-4AE4-B9EA-555F99A46D79} = {EC7B0687-17A1-4FF9-BF4E-DE8F358E1FB7}
{0DABDD3D-CF5D-45C8-AA4F-50189B1EDA77} = {EC7B0687-17A1-4FF9-BF4E-DE8F358E1FB7}
{BBD2EDFD-22FE-4935-ACCC-BF4504F22653} = {0287C9CE-18EC-4AA3-A953-3B279F699212}
EndGlobalSection
EndGlobal
这是由MsBuild返回的错误
d:\CMA\COMP_BUILD_AREA\AUD_GESATT\AUD_GESATT\ProgettoAttivitaWEB\App_Code\DiModule\DataAccessModule.cs(1): error CS0246: The type or namespace name 'Application' could not be found (are you missing a using directive or an assembly reference?) [D:\CMA\COMP_BUILD_AREA\AUD_GESATT\AUD_GESATT\ProgettoAttivitaWEB.metaproj]
d:\CMA\COMP_BUILD_AREA\AUD_GESATT\AUD_GESATT\ProgettoAttivitaWEB\App_Code\DiModule\DataAccessModule.cs(2): error CS0246: The type or namespace name 'Application' could not be found (are you missing a using directive or an assembly reference?) [D:\CMA\COMP_BUILD_AREA\AUD_GESATT\AUD_GESATT\ProgettoAttivitaWEB.metaproj]
d:\CMA\COMP_BUILD_AREA\AUD_GESATT\AUD_GESATT\ProgettoAttivitaWEB\App_Code\DiModule\DataAccessModule.cs(3): error CS0246: The type or namespace name 'Domain' could not be found (are you missing a using directive or an assembly reference?) [D:\CMA\COMP_BUILD_AREA\AUD_GESATT\AUD_GESATT\ProgettoAttivitaWEB.metaproj]
d:\CMA\COMP_BUILD_AREA\AUD_GESATT\AUD_GESATT\ProgettoAttivitaWEB\App_Code\DiModule\DataAccessModule.cs(4): error CS0246: The type or namespace name 'Domain' could not be found (are you missing a using directive or an assembly reference?) [D:\CMA\COMP_BUILD_AREA\AUD_GESATT\AUD_GESATT\ProgettoAttivitaWEB.metaproj]
这是错误的文件:
using Application.DataAccess.NH;
using Application.DataAccess.NH.Repository;
using Domain.Interface.DataAccess;
using Domain.Interface.DataAccess.Repository;
using Ninject.Modules;
namespace ProgettoAttivitaUI.DiModule{
public class DataAccessModule : NinjectModule{
public override void Load(){
Bind<IUnitOfWork>().To<UnitOfWork>();
Bind<IAttivitaRepository>().To<AttivitaRepository>();
}}}