microsoft / TFSDemoGenerator

A utility to help create projects on Visual Studio Team Foundation Server with pre-populated sample content that includes source code, work items, iterations, service endpoints, build and release definitions based on a template you choose. The purpose of this system is to simplify working with the hands-on-labs, demos and other education material provided by the Microsoft Visual Studio Marketing team.
MIT License
15 stars 17 forks source link

DirectoryNotFoundException thrown while while creating a project #15

Open felixlahn opened 3 years ago

felixlahn commented 3 years ago

Every time I create a Project with TFSDemoGenerator (TFS2019.zip on IIS), an error occures in Windows Event Viewer. It looks like a slash has been forgotten somewhere. Stacktrace looks like:

An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/3/ROOT/generator

Process ID: 1528

Exception: System.IO.DirectoryNotFoundException

Message: Could not find a part of the path 'C:\tools\templategen\generatorTemplates\PartsUnlimited\ProjectTemplate.json'.

StackTrace: 
Server stack trace: 
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
   at VstsDemoBuilder.Controllers.EnvironmentController.CreateProjectEnvironment(Project model, String pat, String accountName) in E:\Projects\New folder\AzureDevOpsDemoGenerator\src\VstsDemoBuilder\Controllers\EnvironmentController.cs:line 1455
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
   at VstsDemoBuilder.Controllers.EnvironmentController.ProcessEnvironment.EndInvoke(IAsyncResult result)
   at VstsDemoBuilder.Controllers.EnvironmentController.EndEnvironmentSetupProcess(IAsyncResult result) in E:\Projects\New folder\AzureDevOpsDemoGenerator\src\VstsDemoBuilder\Controllers\EnvironmentController.cs:line 769
   at System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(IMessage msg)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()