diff --git a/FixHintPaths.ps1 b/FixHintPaths.ps1 new file mode 100644 index 0000000..702b8da --- /dev/null +++ b/FixHintPaths.ps1 @@ -0,0 +1,15 @@ +$hintPathPattern = @" +(\d|\w|\s|\.|\\)*packages +"@ + +ls -Recurse -include *.csproj, *.sln, *.fsproj, *.vbproj | + foreach { + $content = cat $_.FullName | Out-String + $origContent = $content + $content = $content -replace $hintPathPattern, "`$(SolutionDir)packages" + if ($origContent -ne $content) + { + $content | out-file -encoding "UTF8" $_.FullName + write-host messed with $_.Name + } +} \ No newline at end of file diff --git a/clean.ps1 b/clean.ps1 new file mode 100644 index 0000000..8d37219 --- /dev/null +++ b/clean.ps1 @@ -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 $_ + } +} diff --git a/migrateToAutomaticPackageRestore.ps1 b/migrateToAutomaticPackageRestore.ps1 new file mode 100644 index 0000000..c9e868b --- /dev/null +++ b/migrateToAutomaticPackageRestore.ps1 @@ -0,0 +1,37 @@ +######################################## +# Regex Patterns for Really Bad Things! +$listOfBadStuff = @( + #sln regex + "\s*(\.nuget\\NuGet\.(exe|targets)) = \1", + #*proj regexes + "\s*", + "\s*(.|\n)*?", + "\s*\w*" +) + +####################### +# 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 + } +} diff --git a/src/.nuget/NuGet.exe b/src/.nuget/NuGet.exe deleted file mode 100644 index 9ca6659..0000000 Binary files a/src/.nuget/NuGet.exe and /dev/null differ diff --git a/src/.nuget/NuGet.targets b/src/.nuget/NuGet.targets deleted file mode 100644 index d3befda..0000000 --- a/src/.nuget/NuGet.targets +++ /dev/null @@ -1,153 +0,0 @@ - - - - $(MSBuildProjectDirectory)\..\ - - - false - - - false - - - true - - - false - - - - - - - - - - - $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) - $([System.IO.Path]::Combine($(ProjectDir), "packages.config")) - $([System.IO.Path]::Combine($(SolutionDir), "packages")) - - - - - $(SolutionDir).nuget - packages.config - $(SolutionDir)packages - - - - - $(NuGetToolsPath)\nuget.exe - @(PackageSource) - - "$(NuGetExePath)" - mono --runtime=v4.0.30319 $(NuGetExePath) - - $(TargetDir.Trim('\\')) - - -RequireConsent - - $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -o "$(PackagesDir)" - $(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols - - - - RestorePackages; - $(ResolveReferencesDependsOn); - - - - - $(BuildDependsOn); - BuildPackage; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/NRConfig.Test/NRConfig.Test.csproj b/src/NRConfig.Test/NRConfig.Test.csproj index bd11ebc..2c6b549 100644 --- a/src/NRConfig.Test/NRConfig.Test.csproj +++ b/src/NRConfig.Test/NRConfig.Test.csproj @@ -21,7 +21,7 @@ true full false - bin\Debug\ + bin\ DEBUG;TRACE prompt 4 @@ -30,7 +30,7 @@ pdbonly true - bin\Release\ + bin\ TRACE prompt 4 diff --git a/src/NRConfig/NRConfig.csproj b/src/NRConfig/NRConfig.csproj index 554bd9b..24eacc9 100644 --- a/src/NRConfig/NRConfig.csproj +++ b/src/NRConfig/NRConfig.csproj @@ -17,7 +17,7 @@ true full false - bin\Debug\ + bin\ DEBUG;TRACE prompt 4 @@ -26,7 +26,7 @@ none true - bin\Release\ + bin\ TRACE prompt 4 diff --git a/src/NRConfigManager.Test/NRConfigManager.Test.csproj b/src/NRConfigManager.Test/NRConfigManager.Test.csproj index 9b11f51..027dad9 100644 --- a/src/NRConfigManager.Test/NRConfigManager.Test.csproj +++ b/src/NRConfigManager.Test/NRConfigManager.Test.csproj @@ -17,13 +17,12 @@ False UnitTest ..\ - true true full false - bin\Debug\ + bin\ DEBUG;TRACE prompt 4 @@ -31,7 +30,7 @@ pdbonly true - bin\Release\ + bin\ TRACE prompt 4 @@ -44,64 +43,64 @@ - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.Analysis.ControlAndDataFlowGraph.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.Analysis.ControlAndDataFlowGraph.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.AstsProjectedAsCodeModel.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.AstsProjectedAsCodeModel.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.CodeModel.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.CodeModel.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.CodeModelToIL.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.CodeModelToIL.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.ContractExtractor.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.ContractExtractor.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.CSharpSourceEmitter.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.CSharpSourceEmitter.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.ILGenerator.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.ILGenerator.dll False - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MetadataHelper.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MetadataHelper.dll False - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MetadataModel.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MetadataModel.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MutableCodeModel.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MutableCodeModel.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MutableMetadataModel.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.MutableMetadataModel.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.NewILToCodeModel.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.NewILToCodeModel.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PdbReader.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PdbReader.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PdbWriter.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PdbWriter.dll False - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PeReader.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PeReader.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PeWriter.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.PeWriter.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.ReflectionEmitter.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.ReflectionEmitter.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.SourceEmitter.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.SourceEmitter.dll - ..\packages\CCI.1.0.13\lib\net40\Microsoft.Cci.SourceModel.dll + $(SolutionDir)packages\CCI.1.0.13\lib\net40\Microsoft.Cci.SourceModel.dll @@ -175,7 +174,6 @@ -