public AbstractMSBuildTestFixture(ITestOutputHelper output)
            : base(output)
        {
            _assemblyLoader = new AssemblyLoader(this.LoggerFactory);
            _msbuildLocator = MSBuildLocator.CreateStandAlone(this.LoggerFactory, _assemblyLoader, allowMonoPaths: false);

            // Some tests require MSBuild to be discovered early
            // to ensure that the Microsoft.Build.* assemblies can be located
            _msbuildLocator.RegisterDefaultInstance(this.LoggerFactory.CreateLogger("MSBuildTests"));
        }
        public AbstractMSBuildTestFixture(ITestOutputHelper output)
            : base(output)
        {
            _assemblyLoader         = new AssemblyLoader(this.LoggerFactory);
            _analyzerAssemblyLoader = ShadowCopyAnalyzerAssemblyLoader.Instance;
            _msbuildLocator         = MSBuildLocator.CreateStandAlone(this.LoggerFactory, _assemblyLoader);

            // Some tests require MSBuild to be discovered early
            // to ensure that the Microsoft.Build.* assemblies can be located
            _msbuildLocator.RegisterDefaultInstance(this.LoggerFactory.CreateLogger("MSBuildTests"), dotNetInfo: null);
        }
Beispiel #3
0
        public AbstractMSBuildTestFixture(ITestOutputHelper output)
            : base(output)
        {
            _assemblyLoader         = new AssemblyLoader(this.LoggerFactory);
            _analyzerAssemblyLoader = ShadowCopyAnalyzerAssemblyLoader.Instance;

            // Since we can only load MSBuild once into our process we need to include
            // prerelease version so that our .NET 7 tests will pass.
            var configuration = new Dictionary <string, string>
            {
                ["sdk:IncludePrereleases"] = bool.TrueString
            }.ToConfiguration();

            _msbuildLocator = MSBuildLocator.CreateDefault(this.LoggerFactory, _assemblyLoader, configuration);

            // Some tests require MSBuild to be discovered early
            // to ensure that the Microsoft.Build.* assemblies can be located
            _msbuildLocator.RegisterDefaultInstance(this.LoggerFactory.CreateLogger("MSBuildTests"), dotNetInfo: null);
        }