-
Notifications
You must be signed in to change notification settings - Fork 2
Is GetProjectReferences broken? #1
Comments
I'm sorry but as stated in the description only .NET Core based projects are supported (targeting netstandard or netcoreapp). |
.NET Core (SDK) based projects targeting full framework are not supported? Why? |
I have created a sample project and I see that SDK based projects targeting full framework are supported. It works quite well, but there is a problem with projects targeting multiple frameworks. In that case the path to referenced project assembly is not resolved correctly. Sample project: Fiddle.zip |
Also it looks there is an issue when the referenced project targets
|
I did not test it with multiple framework targets, but it seems additional logic has to be added to To support 2.0 I have to deploy a new version of Automaty.DotNetCli which also targets netcoreapp2.0. |
Ok, do you have time to fix it? Or should I send PR? |
Updating Automaty.DotNetCli to netcoreapp2.0 should be no problem, but I'm happy if you have some time to investigate the multiple framework target problem because that's something I can't fix within the next days as I'm busy (don't know how important this feature is for you). This is the place to start with, you have to deal with the MSBuild api, read TargetFrameworks and somehow decide which target to use. Debugging Automaty is quite cumbersome though. |
Thanks for your contribution, I've merged your pull request and already uploaded a new version of Automaty (Core and DotNetCli). Let me know if this works for you. May I ask what you are going / trying to implement with Automaty? Is it going to be open source? |
It works now, thank you! I will probably use it in https://www.dotvvm.com/ and related projects. I want to replace T4 templates and Scripty. T4 templates don't run on build and Scripty is not compatible with .NET CLI. Automaty looks really promising. But I am not sure whether it's good idea to use plain C# files. Generators are "build-time" and should not be compiled into project assembly. |
Now I see why full .NET is not supported. Not all dependencies are loaded from NuGet packages and therefore are not available during compilation of generators. Eg. you can't use |
@Dresel Would it make sense to always import |
Well you could set
I thought that
You mean for .NET support? |
Exactly. If you import some set of standard libraries, it would work much better with full .NET. |
Hmm, Automaty works without issues in projects targeting .NET 4.7, but not in projects targeting .NET 4.6. Maybe because .NET 4.7 references all assemblies included in |
I've tried to use Automaty to replace Scripty, but it fails to load project references. The referenced assembly is loaded from
bin/Debug/Assembly.dll
, but it's in fact located inbin/Debug/net451/Assembly.dll
.The text was updated successfully, but these errors were encountered: