modelsbuilder / ModelsBuilder.Original

The Community Models Builder for Umbraco
MIT License
114 stars 49 forks source link

Can't generate Models through VS #64

Closed ad794 closed 9 years ago

ad794 commented 9 years ago

Hi,

I keep getting the following error when I try to generate Models through VS by right clicking on the file. Any help would be greatly appreciated!

_ZbuModelsBuilder: Starting v2.1.3.52 13/08/2015 15:05:16._ _ZbuModelsBuilder: ZbuModelsBuilder failed to generate code: Exception: Response status code does not indicate success (InternalServerError)_ _{"Message":"An error has occurred.","ExceptionMessage":"Value cannot be null.\r\nParameter name: v1","ExceptionType":"System.ArgumentNullException","StackTrace":" at System.Version.op_LessThanOrEqual(Version v1, Version v2)\r\n at Zbu.ModelsBuilder.Compatibility.IsCompatible(Version clientVersion)\r\n at Zbu.ModelsBuilder.AspNet.ModelsBuilderApiController.CheckVersion(Version clientVersion, Version minServerVersionSupportingClient)\r\n at Zbu.ModelsBuilder.AspNet.ModelsBuilderApiController.ValidateClientVersion(ValidateClientVersionData data)\r\n at lambdamethod(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>cDisplayClass13.bc(Object instance, Object[] methodParameters)\r\n at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)"}** 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 v2.1.3.52 13/08/2015 15:12:43. ZbuModelsBuilder: ZbuModelsBuilder failed to generate code: Exception: Response status code does not indicate success (InternalServerError) _{"Message":"An error has occurred.","ExceptionMessage":"Value cannot be null.\r\nParameter name: v1","ExceptionType":"System.ArgumentNullException","StackTrace":" at System.Version.op_LessThanOrEqual(Version v1, Version v2)\r\n at Zbu.ModelsBuilder.Compatibility.IsCompatible(Version clientVersion)\r\n at Zbu.ModelsBuilder.AspNet.ModelsBuilderApiController.CheckVersion(Version clientVersion, Version minServerVersionSupportingClient)\r\n at Zbu.ModelsBuilder.AspNet.ModelsBuilderApiController.ValidateClientVersion(ValidateClientVersionData data)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>cDisplayClass13.bc(Object instance, Object[] methodParameters)\r\n at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)"} 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)_**

zpqrtbnk commented 9 years ago

From the stack trace, it looks like you are running version v2.1.3.52 of the VSIX extension, ie you updated the VSIX extension... but may be running an older version of the web component. Too old to properly report that versions are not compatible. Can you check and report the version of the Zbu.ModelsBuilder.dll file in your ~/bin directory?

ad794 commented 9 years ago

Hi Stephan,

Thanks you for your reply! Below is a screen shot showing the dll version I am using

Many thanks for your help again!

dll

zpqrtbnk commented 9 years ago

You are using version 2.0.2.31 of the web component, and the VSIX extension cannot talk to that version. You also need to update the web site (using NuGet, Umbraco package... whichever method was used in the first place).

ad794 commented 9 years ago

Thanks for your help.

For some reason VS was still picking up the old 2.0.2-final version even when I removed and referenced the new one. I had to Force Uninstall everything using NuGet.

And then Install 2.1.3 by specifying explicitly -Version 2.1.3 in Nuget Install statement.

Now everything is working can;t believe I was stuck on this for days but glad its finally sorted. Really really appreciate your help!!

Have a good day

Many thanks Adnan

zpqrtbnk commented 9 years ago

Good!