1
votes

I am using Visual Studio Express 2013 for Web & developing web APPS ( not sites ) on .net 4.5.

I build,test & view my site on a local IIS 7.5. I host on Azure - using App Services. I build and release to an App Services slot using VSTS Online

I have my classes in an App_Code folder - files are marked as compile This appears to be the only way I can set this up to work on local IIS ( or am I missing something ?) And it all works - all classes are available

But I need to build and release on VSTS/TFS ( using VS Team explorer to push) I am using the standard Azure Web App build definition module on TFS - Which takes the App_Code folder and moves it into the bin folder - but does not compile it - thus breaking the classes when they are deployed

I have tried renaming App_Code but that breaks local and still does not compile on TFS

What am I missing - how do I get TFS to either compile my classes OR copy the App_Code folder to the root ( not ideal but hey it works )?

1
How did you manager your APP_Code folder in local? Did you want to use the complied classes during the web app deploy? Are you building the whole net solution or just .csproj project?PatrickLu-MSFT
I create an App_Code folder in VS using Add ASP.NET folder - then create my files in there. Then I build. I am building just the project ( actually solution in this case is just one project). But when I Commit & Push to VSTS it moves the App_Code folder into /bin. But this does not compile - so the classes are not avaible to meKevin Kidson

1 Answers

0
votes

In TFS, dll files will be generated under bin folder when you build a Class Library project. This is the correct phenomenon. Suggest you to create a Nuget Packages to manage your class libraries . And you can add a "NuGet Installer" task at the top of your build definition to restore the nuget packages for your solution.

enter image description here

If you are using vNext Build on TFS. There also has been a very detail tutorial Build and Deploy Azure Web Apps using Team Foundation Server/Services vNext Builds for you reference.