-
Notifications
You must be signed in to change notification settings - Fork 17
Fix for reference assemblies not working correctly #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, especially including a test to exercise the issue. 👍 The only problem I have is bloating the repo with a permanent and large (641 KB) binary footprint of Newtonsoft.Json.dll
. Can we go with getting that out of band and/or use something way smaller and leaner?
tests/GenerationTests.cs
Outdated
string tmp = null; | ||
gen.ReferencePaths.Add (Path.GetDirectoryName (typeof (Uri).Assembly.Location)); | ||
gen.ReferencePaths.Add (Path.GetDirectoryName (typeof (System.Linq.Enumerable).Assembly.Location)); | ||
gen.ReferencePaths.Add(TestContext.CurrentContext.TestDirectory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a space after Add
just for style consistency with the lines above.
1a6f5b0
to
13a9bbd
Compare
13a9bbd
to
5ddec5e
Compare
Tidied the PR up to just use the json.net package's assembly location + normalized styling. Let me know if your happy @atifaziz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just made some polishing touch otherwise it's good. I guess the indirect dependency on Json.NET (via Microsoft.NET.Test.Sdk and Microsoft.TestPlatform.TestHost) is okay and if it ever disappears from underneath when upgrading the package references then the test project won't compile and the problem can be addressed then.
Thanks again for the fix and the PR!
Thanks @atifaziz - any chance of a new nuget package with the fix? |
|
Today while attempting to using T5 for the first time, I found that referencing 3rd party assemblies like
Newtonsoft.Json
were not working.It would fail to compile because it did not recognize the types from the assembly.
Upon further investigation I found that the references were not being included correctly when compiling with CSharpScript.
This PR should reproduce the issue and fix it.