1

We've got two sets of projects, one is framework projects and the other is the actual app. The app references the framework projects directly via the visual studio project reference feature. The framework build process publishes a nuget package already. Is there any way to make it so when I trigger a build on TFS of the actual app it uses that nuget package instead of the project reference? Ideally I'd like to have it still be a project reference when local, but if that's not possible that's alright.

Omegam44
  • 31
  • 5
  • Are the framework projects used somewhere else than on the App ? If not, what is the point to have a nuget package ? Will you use the Framework projects in a different project/App ? – Zysce Aug 24 '18 at 17:08
  • Yes they're being used by other groups. They actually were entirely separate and the app consumed it via nuget packages until fairly recently because too many breaking changes were going through, hence them being so tightly coupled now. – Omegam44 Aug 24 '18 at 17:12
  • May be, what you can do is to have 2 branches of your App on your SVC, 1 dev and 1 prod. The dev will use the nuget dev package (add -symbols when you pack the package) and the prod use the release package – Zysce Aug 24 '18 at 17:16
  • But why don't you want use project references on TFS too? – Andrei Prigorshnev Aug 24 '18 at 22:12
  • 2 branches or conditionals in the csproj it's too complicated. I guess you shouldn't do it, you better rethink your problem and try to find another solution. – Andrei Prigorshnev Aug 24 '18 at 22:17

1 Answers1

1

I discovered you can use conditionals in the csproj files to determine which item group to use, and by making a custom build configuration I can specify which item group to use on TFS.

Omegam44
  • 31
  • 5
  • You could [Accept it as an Answer](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work), This can be beneficial to other community members reading this thread. – Andy Li-MSFT Aug 30 '18 at 01:52