Quantum icon indicating copy to clipboard operation
Quantum copied to clipboard

Remove References to Exe Projects

Open ScottCarda-MS opened this issue 5 years ago • 4 comments

Q# projects that make references to Q# executable projects cause an issue with C# generation, creating duplicate definitions for generated classes. This PR addresses this in the samples by changing referenced projects to be Q# library projects instead.

Having C# classes defined under a Q# project causes issues when the C# class references a Q# library element. The C# will see the reference to the packaged definition of the element, but building the Q# project will also produce a duplicate definition when it performs C# generation. This causes a warning at best and an error in certain cases. This PR addresses this by separating the C# classes into their own C# projects and the Q# files into Q# projects in the projects under the chemistry folder.

ScottCarda-MS avatar Nov 04 '20 21:11 ScottCarda-MS

@ScottCarda-MS , will the samples still run without the EntryPoint definitions?

guenp avatar Nov 04 '20 22:11 guenp

@ScottCarda-MS , will the samples still run without the EntryPoint definitions?

I'm not totally sure yet. The ones that have C# drivers should still run I believe, but we may need to do something else for the ones without C# drivers.

ScottCarda-MS avatar Nov 05 '20 01:11 ScottCarda-MS

@ScottCarda-MS Hi Scott, just wanted to check in with you if this is still a work in progress?

guenp avatar Mar 18 '21 15:03 guenp

@ScottCarda-MS Hi Scott, just wanted to check in with you if this is still a work in progress?

@guenp Yep, it is just taking a bit longer than we thought to be able to refactor this repo. There were some feature requests made in the effort to do so, including the Multiple Entry Points feature that I have some PRs up for now. These features were requested to allow for a more proper refactor of the Samples repo. This is still in my work stack 😄.

ScottCarda-MS avatar Mar 18 '21 17:03 ScottCarda-MS