Closed alanmac closed 9 years ago
I'm not really following the solution in the link. It seems very hacky. Any chance of a version that with the updated references that installs with out error?
This should be taken care of by 2.0.3.
Thanks.
I've installed the latest extension and 2 new nuget packages. That all went well.
I ran the tool and it certainly did more this time but I got an error message at the very end without any new classes being created as I expected.
Running the tool again results in an instant error message.
Is there a log I can look at to see what the error is?
Matt
Damn. The custom tool logs into the output console... in Visual Studio you have to View | Output and pick the right output in Show output from and there should be the exception stack trace.
Hmmm worry not...I went back to it after your information above, ran it again and it worked. It created the class I expected and my project compiles so hat's all good. Thanks!
Anyway here's my output:
ZbuModelsBuilder: Starting 09/01/2015 14:19:49. ZbuModelsBuilder: ZbuModelsBuilder failed to generate code: Exception: Response status code does not indicate success (Forbidden) "API version conflict: client version (0.0.0.0) is not compatible with server version(2.0.0.26)." ZbuModelsBuilder: at Zbu.ModelsBuilder.AspNet.ModelsBuilderApi.EnsureSuccess(HttpResponseMessage result) at Zbu.ModelsBuilder.AspNet.ModelsBuilderApi.ValidateClientVersion() at Zbu.ModelsBuilder.CustomTool.CustomTool.ZbuModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg) ZbuModelsBuilder: Starting 09/01/2015 14:21:01. ZbuModelsBuilder: ZbuModelsBuilder failed to generate code: Exception: Response status code does not indicate success (Forbidden) "API version conflict: client version (0.0.0.0) is not compatible with server version(2.0.0.26)." ZbuModelsBuilder: at Zbu.ModelsBuilder.AspNet.ModelsBuilderApi.EnsureSuccess(HttpResponseMessage result) at Zbu.ModelsBuilder.AspNet.ModelsBuilderApi.ValidateClientVersion() at Zbu.ModelsBuilder.CustomTool.CustomTool.ZbuModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg) ZbuModelsBuilder: Starting 09/01/2015 14:21:26. ZbuModelsBuilder: ZbuModelsBuilder failed to generate code: Exception: Response status code does not indicate success (Forbidden) "API version conflict: client version (0.0.0.0) is not compatible with server version(2.0.0.26)." ZbuModelsBuilder: at Zbu.ModelsBuilder.AspNet.ModelsBuilderApi.EnsureSuccess(HttpResponseMessage result) at Zbu.ModelsBuilder.AspNet.ModelsBuilderApi.ValidateClientVersion() at Zbu.ModelsBuilder.CustomTool.CustomTool.ZbuModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg) ZbuModelsBuilder: Starting 09/01/2015 14:31:45. ZbuModelsBuilder: Done.
That error message sometimes pops when Visual Studio hasn't properly refreshed the extension... ie you have to close all instances of Visual Studio and reopen. Glad that it works!
Thanks for your efforts!
Just having teething problems getting this project set up. I have a separate class library for the models that I have the Umbraco Core Binaries and ModelsBuilder library installed via NuGet to. I set up the custom tool options but when I run I get this error:
ZbuModelsBuilder: ZbuModelsBuilder failed to generate code: FileNotFoundException: Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Not sure why, I can see System.Web.Http (v4) is present as a reference in the project.
Insights much appreciated!
Alan