Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions FixHintPaths.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$hintPathPattern = @"
<HintPath>(\d|\w|\s|\.|\\)*packages
"@

ls -Recurse -include *.csproj, *.sln, *.fsproj, *.vbproj |
foreach {
$content = cat $_.FullName | Out-String
$origContent = $content
$content = $content -replace $hintPathPattern, "<HintPath>`$(SolutionDir)packages"
if ($origContent -ne $content)
{
$content | out-file -encoding "UTF8" $_.FullName
write-host messed with $_.Name
}
}
10 changes: 10 additions & 0 deletions clean.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#######################
# Delete Junk

ls -Recurse -include 'bin','obj','packages' |
foreach {
if ((ls $_.Parent.FullName | ?{ $_.Name -Like "*.sln" -or $_.Name -Like "*.*proj" }).Length -gt 0) {
remove-item $_ -recurse -force
write-host deleted $_
}
}
37 changes: 37 additions & 0 deletions migrateToAutomaticPackageRestore.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
########################################
# Regex Patterns for Really Bad Things!
$listOfBadStuff = @(
#sln regex
"\s*(\.nuget\\NuGet\.(exe|targets)) = \1",
#*proj regexes
"\s*<Import Project=""\$\(SolutionDir\)\\\.nuget\\NuGet\.targets"".*?/>",
"\s*<Target Name=""EnsureNuGetPackageBuildImports"" BeforeTargets=""PrepareForBuild"">(.|\n)*?</Target>",
"\s*<RestorePackages>\w*</RestorePackages>"
)

#######################
# Delete NuGet.targets

ls -Recurse -include 'NuGet.exe','NuGet.targets' |
foreach {
remove-item $_ -recurse -force
write-host deleted $_
}

#########################################################################################
# Fix Project and Solution Files to reverse damage done by "Enable NuGet Package Restore

ls -Recurse -include *.csproj, *.sln, *.fsproj, *.vbproj, *.wixproj, *.vcxproj |
foreach {
sp $_ IsReadOnly $false
$content = cat $_.FullName | Out-String
$origContent = $content
foreach($badStuff in $listOfBadStuff){
$content = $content -replace $badStuff, ""
}
if ($origContent -ne $content)
{
$content | out-file -encoding "UTF8" $_.FullName
write-host messed with $_.Name
}
}
Binary file removed src/.nuget/NuGet.exe
Binary file not shown.
153 changes: 0 additions & 153 deletions src/.nuget/NuGet.targets

This file was deleted.

4 changes: 2 additions & 2 deletions src/NRConfig.Test/NRConfig.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -30,7 +30,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
4 changes: 2 additions & 2 deletions src/NRConfig/NRConfig.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -26,7 +26,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
44 changes: 21 additions & 23 deletions src/NRConfigManager.Test/NRConfigManager.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -44,64 +43,64 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Cci.Analysis.ControlAndDataFlowGraph">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.Analysis.ControlAndDataFlowGraph.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.Analysis.ControlAndDataFlowGraph.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.AstsProjectedAsCodeModel">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.AstsProjectedAsCodeModel.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.AstsProjectedAsCodeModel.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.CodeModel">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.CodeModel.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.CodeModel.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.CodeModelToIL">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.CodeModelToIL.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.CodeModelToIL.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.ContractExtractor">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.ContractExtractor.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.ContractExtractor.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.CSharpSourceEmitter">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.CSharpSourceEmitter.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.CSharpSourceEmitter.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.ILGenerator">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.ILGenerator.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.ILGenerator.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.MetadataHelper, Version=1.0.13.0, Culture=neutral, PublicKeyToken=736440c9b414ea16, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MetadataHelper.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MetadataHelper.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.MetadataModel, Version=1.0.13.0, Culture=neutral, PublicKeyToken=736440c9b414ea16, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MetadataModel.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MetadataModel.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.MutableCodeModel">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MutableCodeModel.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MutableCodeModel.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.MutableMetadataModel">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MutableMetadataModel.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MutableMetadataModel.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.NewILToCodeModel">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.NewILToCodeModel.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.NewILToCodeModel.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.PdbReader">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PdbReader.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PdbReader.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.PdbWriter">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PdbWriter.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PdbWriter.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.PeReader, Version=1.0.13.0, Culture=neutral, PublicKeyToken=736440c9b414ea16, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PeReader.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PeReader.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.PeWriter">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PeWriter.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PeWriter.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.ReflectionEmitter">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.ReflectionEmitter.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.ReflectionEmitter.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.SourceEmitter">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.SourceEmitter.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.SourceEmitter.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Cci.SourceModel">
<HintPath>..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.SourceModel.dll</HintPath>
<HintPath>$(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.SourceModel.dll</HintPath>
</Reference>
<Reference Include="System" />
</ItemGroup>
Expand Down Expand Up @@ -175,7 +174,6 @@
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<!-- 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">
Expand Down
Loading