I am trying to build an "old" Razor project on my Macbook Pro (M1) with Visual Studio 2022 for Mac (17.4).
The solution is composed of several projects. They all build except the Razor project.
I get the following error: rzc generate exited with code 129.
If I look at the build output I have this:
Target RazorGenerateComponentDeclaration:
/usr/local/share/dotnet/dotnet exec "/Users/redacted/Library/Caches/VisualStudio/17.0/MSBuild/36265_3/Sdks/Microsoft.NET.Sdk.Razor/build/netstandard2.0/../../tools/netcoreapp3.0/rzc.dll" generate
-s
/Users/redacted/Developer/repositories/bcee/Toolkit/RedactedCompany.Toolkit.Platform.Web/_Imports.razor
-r
_Imports.razor
-o
/Users/redacted/Developer/repositories/bcee/Toolkit/RedactedCompany.Toolkit.Platform.Web/obj/Debug/netstandard2.1/RazorDeclaration/_Imports.razor.g.cs
-k
component
-p
/Users/redacted/Developer/repositories/bcee/Toolkit/RedactedCompany.Toolkit.Platform.Web
-t
obj/Debug/netstandard2.1/RedactedCompany.Toolkit.Platform.Web.RazorComponents.declaration.json
-v
3.0
-c
Default
--root-namespace
RedactedCompany.Toolkit.Web
--csharp-language-version
8.0
--generate-declaration
The application to execute does not exist: '/Users/redacted/Library/Caches/VisualStudio/17.0/MSBuild/36265_3/Sdks/Microsoft.NET.Sdk.Razor/build/netstandard2.0/../../tools/netcoreapp3.0/rzc.dll'
/Users/redacted/Library/Caches/VisualStudio/17.0/MSBuild/36265_3/Sdks/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Microsoft.NET.Sdk.Razor.Component.targets(106,5): error : rzc generate exited with code 129.
Done building target "RazorGenerateComponentDeclaration" in project "RedactedCompany.Toolkit.Platform.Web.csproj" -- FAILED.
Done building project "RedactedCompany.Toolkit.Platform.Web.csproj" -- FAILED.
Build FAILED.
The interesting line is: The application to execute does not exist: '/Users/redacted/Library/Caches/VisualStudio/17.0/MSBuild/36265_3/Sdks/Microsoft.NET.Sdk.Razor/build/netstandard2.0/../../tools/netcoreapp3.0/rzc.dll'
I can confirm the file does not exist. And if I look into the Razor SDK it does not contain the rzc.dll at all.
➜ ~ ls -al /Users/redacted/Library/Caches/VisualStudio/17.0/MSBuild/36265_3/Sdks/Microsoft.NET.Sdk.Razor/
total 16
drwxr-xr-x# 9 florian staff 288 Jan 24 17:50 .
drwxr-xr-x# 12 florian staff 384 Jan 24 17:50 ..
-rwxr--r--# 1 florian staff 7006 Jan 12 18:32 Icon.png
drwxr-xr-x# 5 florian staff 160 Jan 24 17:50 Sdk
drwxr-xr-x# 3 florian staff 96 Jan 24 17:50 build
drwxr-xr-x# 4 florian staff 128 Jan 24 17:50 buildMultiTargeting
drwxr-xr-x# 3 florian staff 96 Jan 24 17:50 extensions
drwxr-xr-x# 3 florian staff 96 Jan 24 17:50 lib
drwxr-xr-x# 3 florian staff 96 Jan 24 17:50 tasks
➜ ~ find /Users/redacted/Library/Caches/VisualStudio/17.0/MSBuild/36265_3/Sdks/Microsoft.NET.Sdk.Razor/ -name 'rzc.dll'
# nothing
The Razor csproj file looks like this:
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<RazorLangVersion>3.0</RazorLangVersion>
<PackageId>RedactedCompany.Toolkit.Web</PackageId>
<PackageVersion>0.0.0</PackageVersion>
<Authors>RedactedCompany</Authors>
<Description>Web implementations of architectural guidelines</Description>
<Copyright>2020</Copyright>
<NeutralLanguage>en</NeutralLanguage>
<Owners>RedactedCompany</Owners>
<Summary>Web implementations of architectural guidelines</Summary>
<PackageTags>dotnet,architecture,toolkit,web</PackageTags>
<Title>Toolkit.Platform Web</Title>
<RootNamespace>RedactedCompany.Toolkit.Web</RootNamespace>
<ReleaseVersion>0.0.0</ReleaseVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.9" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.9" />
<PackageReference Include="NuGet.Build.Packaging" Version="0.2.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="RedactedCompany.Toolkit.Architecture" Version="1.3.2-alpha" />
</ItemGroup>
<ItemGroup>
<Folder Include="Infrastructure\" />
</ItemGroup>
</Project>
If I create a new class library the csproj looks like this:
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.2" />
</ItemGroup>
</Project>
And of course it builds.
I am no expert with the whole .NET ecosystem so I am kind of lost.
Should I try to migrate from netstandard2.1 to net7.0? I think I've read that .NET 7 should be compatible with netstandard2.1.
Can I still build that kind of project with the latest version of Visual Studio?
Do you know why the rzc.dll is not there?
Related
I used to have a venv with mysql#5.5 installed. This somehow broke (I guess because I upgraded my python version) so I'm now trying to recreate it.
However I am getting the following error:
ImportError: dlopen(/Users/bartjonk/Envs/w-poc/lib/python3.9/site-packages/MySQLdb/_mysql.cpython-39-darwin.so, 2): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib Referenced from: /usr/local/opt/mysql#5.5/lib/libmysqlclient.18.dylib Reason: image not found.
I don't know how to fix it.
I can't do a brew switch ore create symlinks as recommended here, since openssl version 1.0.0 is no longer in my cellar:
`> ls -al /usr/local/Cellar/op*
total 0
drwxr-xr-x 3 bartjonk staff 96 2 nov 14:42 .
drwxrwxr-x 106 bartjonk admin 3392 6 nov 17:59 ..
drwxr-xr-x 14 bartjonk staff 448 2 nov 14:42 1.1.1h`
and brew install openssl#1.0.0s or any other variants (brew install openssl#1.0 etc.) only result in :
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "openssl#1.0.2s".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
The link in the comment given by #Reinier Torenbeek (answer to: OpenSSL 1.0.2m on macOS) works like a charm.
I can now switch between the old and the new implementation using:
brew switch openssl 1.0.2m
You can check which versions are available using:
ls -al /usr/local/Cellar/op*
A similar issue has been posted in the past about scaffolding in .net core 2 but that was on a date column and no solution has been posted to date.
There's no specific table as any table containing a datetime column type throws the following error from the console:
Could not find type mapping for column 'database.table.columnname' with data type 'datetime'. Skipping column.
This answer to a question about reading datetime values and a MySQL quirk with 0000-00-00 00:00:00 values made me wonder if changing the connection string format would help. So I added the ConvertZeroDateTime=true to the connection string in the scaffold command:
Scaffold-DbContext "server=localhost;port=3306;user=root;password=notherealpassword;database=sodb;ConvertZeroDateTime=true;" MySql.Data.EntityFrameworkCore -OutputDir Model -f
I still have the same error, does anyone have any suggestions? I have 380+ tables in this database so an automated solution would be most helpful.
I had the same problem and now I solved it.
I can't be assured if my solution works to your case but I think this solution would work to your case.
Remove all packages related to Entity Framework.
Install the following packages the version is 5.0.4
Open Package Manager Console window. Now we will install Pomelo packages it depends on .Net standard.
Enter the command “Install-Package Pomelo.EntityFrameworkCore.MySql -Version 5.0.0-alpha.2”
Enter the command "Install-Package Pomelo.EntityFrameworkCore.MySql.NetTopologySuite -Version 5.0.0-alpha.2"
The commands try to install the following packages.
Now Enter to Package Manager Console window the following command.
Scaffold-DbContext "server=localhost;port=3306;uid=root;pwd=notherealpassword;database=sodb; "Pomelo.EntityFrameworkCore.MySql" -OutputDir Models -f
The result of command is as below.
I hope this post helps you.
I was scaffolding off mySql 5.7 in .net core 2.2 using pomelo no problem until i tried upgrading to 3.1
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.6">
<PackageReference Include="MySql.Data" Version="8.0.21" />
<PackageReference Include="MySql.Data.EntityFrameworkCore.Design" Version="8.0.19" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.2.6" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2" />
This combination worked for me calling
PM> Scaffold-DbContext [ConnectionStringHere] MySql.Data.EntityFrameworkCore -OutputDir [NameHere] -Project "[NameHere]" -Force
With the below packages, scaffolding just skips datetime completely (also bytes are converted to bools)
So to workaround. I used my source control to keep the old datetime classes and just manually updated the bools. You could try downgrading to older versions to see if helps.
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.11"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.11">
<PackageReference Include="MySql.Data" Version="8.0.23" />
<PackageReference Include="MySql.Data.EntityFrameworkCore.Design" Version="8.0.19" />
<PackageReference Include="NonFactors.Grid.Mvc6" Version="6.1.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.2.4" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2" />
I have achieved a fix for this today with the following Nugets: -
And then in Package Manager Console of Visual Studio: -
Scaffold-DbContext "server=MYSERVER;port=3306;database=MYDB;user=MYUSER;password=MYPW;" MySql.EntityFrameworkCore -UseDatabaseNames -f
The "-UseDatabaseNames" and "-f" flags are not essential to the bare fix, but that's what I'm using.
The crucial detail is that MySql.EntityFrameworkCore v5.0.3 works where v5.0.0 does not.
I was getting datetime/timestamp erros like yours, I must had to use those packages to made to work
mysql.entityframeworkcore isnt necessary
And the command to export is
dotnet ef dbcontext scaffold "Database=#dbname;Data Source=#ip:#port;User Id=#user;Password=#pass;Initial Catalog=#dbname;" pomelo.entityframeworkcore.mysql -o Models -f -c DBContext
mysql command failed with rc 1:0
Mon Sep 7 22:17:00 2020 - [info] Executing command : apply_diff_relay_logs --command=test --slave_user='root' --slave_host=192.168.142.134 --slave_ip=192.168.142.134 --slave_port=3306 --workdir=/var/tmp --target_version=5.7.28-log --manager_version=0.58 --relay_log_info=/home/mysql/data/relay-log.info --relay_dir=/home/mysql/data/ --slave_pass=xxx <br />
Mon Sep 7 22:17:00 2020 - [info] Connecting to root#192.168.142.134(192.168.142.134:22).. <br />
Checking slave recovery environment settings..<br />
Opening /home/mysql/data/relay-log.info ... ok.<br />
Relay log found at /home/mysql/data, up to mysql-relay-bin.000002<br />
Temporary relay log file is /home/mysql/data/mysql-relay-bin.000002<br />
Checking if super_read_only is defined and turned on.. not present or turned off, ignoring.<br />
Testing mysql connection and privileges..<br />
mysql: [Warning] Using a password on the command line interface can be insecure.<br />
ERROR 1175 (HY000) at line 1: Unknown error 1175<br />
mysql command failed with rc 1:0!<br />
at /usr/local/bin/apply_diff_relay_logs line 404.<br />
main::check() called at /usr/local/bin/apply_diff_relay_logs line 536<br />
eval {...} called at /usr/local/bin/apply_diff_relay_logs line 514<br />
main::main() called at /usr/local/bin/apply_diff_relay_logs line 121<br />
Mon Sep 7 22:17:00 2020 - [error][/usr/lib/perl5/site_perl/5.18.2/MHA/MasterMonitor.pm, ln208] Slaves settings check failed!<br />
Mon Sep 7 22:17:00 2020 - [error][/usr/lib/perl5/site_perl/5.18.2/MHA/MasterMonitor.pm, ln416] Slave configuration failed.<br />
Mon Sep 7 22:17:00 2020 - [error][/usr/lib/perl5/site_perl/5.18.2/MHA/MasterMonitor.pm, ln427] Error happened on checking configurations. at /usr/local/bin/masterha_check_repl line 48.<br />
Mon Sep 7 22:17:00 2020 - [error][/usr/lib/perl5/site_perl/5.18.2/MHA/MasterMonitor.pm, ln525] Error happened on monitoring servers.<br />
Mon Sep 7 22:17:00 2020 - [info] Got exit code 1 (Not master dead).<br />
MySQL Replication Health is NOT OK!<br />
Please ask the gods what's going on?
I have been at it for days. Basically I want to create a HTML report from JMeter test file, using Ant. I am using Linux Ubuntu 16.04.1. Here is my build.xml :
<project name="performance-tests" default="run-performance-tests" basedir=".">
<property name="testpath" value="${user.dir}"/>
<poperty name="jmeter.home" value="/home/richard/Asjad/apache-jmeter-3.0"/>
<!-- Name of test (without .jmx) -->
<property name="test" value="Test"/>
<path id="jmeter.path">
<fileset dir="${basedir}" includes="/*.jar" />
</path>
<target name="run-performance-tests">
<delete dir="${basedir}/target" quiet="true" failonerror="false"/>
<mkdir dir="${basedir}/target"/>
<!-- Allow jar to be picked up locally -->
<path id="jmeter.classpath">
<fileset dir="${basedir}">
<include name="ant-jmeter*.jar"/>
</fileset>
</path>
<taskdef name="jmeter"
classpathref="jmeter.classpath"
classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask" />
<echo message="Running load tests in testing.xml"/>
<jmeter
jmeterhome="${jmeter.home}"
testplan ="${testpath}/${test}.jmx"
resultlog="${basedir}/target/JMeterResults.xml">
<jvmarg value="-Xincgc"/>
<jvmarg value="-Xmx512m"/>
<jvmarg value="-Dproperty=value"/>
<property name="request.threads" value="5"/>
<property name="request.loop" value="50"/>
<property name="jmeter.save.saveservice.assertion_results" value="all"/>
<property name="jmeter.save.saveservice.output_format" value="xml"/>
</jmeter>
<xslt in="${basedir}/target/JMeterResults.xml"
out="${basedir}/target/Test.html"
style="${basedir}/jmeter-results-detail-report.xsl"/>
</target>
This is what I see when I run the script:
Buildfile: /home/richard/Asjad/apache-jmeter-3.0/extras/build.xml
run-performance-tests:
[delete] Deleting directory /home/richard/Asjad/apache-jmeter-3.0/extras/target
[mkdir] Created dir: /home/richard/Asjad/apache-jmeter-3.0/extras/target
[echo] Running load tests in testing.xml
[jmeter] Executing test plan: /home/richard/Asjad/apache-jmeter-3.0/extras/TestPlan/Test.jmx ==> /home/richard/Asjad/apache-jmeter-3.0/extras/target/JMeterResults.xml
[jmeter] Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
[jmeter] Writing log file to: /home/richard/Asjad/apache-jmeter-3.0/bin/jmeter.log
[jmeter] Creating summariser <summary>
[jmeter] Created the tree successfully using /home/richard/Asjad/apache-jmeter-3.0/extras/TestPlan/Test.jmx
[jmeter] Starting the test # Fri Jul 29 11:57:25 EEST 2016 (1469782645099)
[jmeter] Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
[jmeter] summary = 10 in 00:00:02 = 4.6/s Avg: 214 Min: 105 Max: 344 Err: 0 (0.00%)
[jmeter] Tidying up ... # Fri Jul 29 11:57:27 EEST 2016 (1469782647345)
[jmeter] ... end of run
[xslt] Processing /home/richard/Asjad/apache-jmeter-3.0/extras/target/JMeterResults.xml to /home/richard/Asjad/apache-jmeter-3.0/extras/target/Result_One.html
[xslt] Loading stylesheet /home/richard/Asjad/apache-jmeter-3.0/extras/jmeter-results-detail-report.xsl
BUILD SUCCESSFUL
Total time: 3 seconds
The build succeeds and then it gives me a HTML file and when I open it I see this:
HTML report
I would be really thankful if someone could at least tell me my mistake or direction I am supposed to go.
It looks like JMeter developers broke jmeter-results-detail-report.xsl file, bug was reported here:
https://bz.apache.org/bugzilla/show_bug.cgi?id=59918
It will be fixed in next Apache JMeter version 3.1.
In order to revert to previous behaviour take the following steps:
Download apache-jmeter-2.13.zip
Extract jmeter-results-detail-report_21.xsl file from apache-jmeter-2.13/extras folder and drop it to "extras" folder of your JMeter 3.0 installation
Modify your build.xml file to use jmeter-results-detail-report_21.xsl file like:
<xslt in="${basedir}/target/JMeterResults.xml"
out="${basedir}/target/Test.html"
style="${basedir}/jmeter-results-detail-report_21.xsl"/>
Alternatively you can get XSLT file i.e. from here
See Visualizing JMeter .jtl Files Viewed as An .xsl Stylesheet article for more details on transforming JMeter XML result files to HTML format.
It's a bug that I reported here:
https://bz.apache.org/bugzilla/show_bug.cgi?id=59918
It will be fixed in next Apache JMeter version 3.1 or 3.0.1.
You can test if it's ok by using nightly build present here:
http://jmeter.apache.org/nightly.html
Why still use Ant + xslt to generate a report while since 3.0 you have a new web report with lots of dynamic graphsand tables with significant metrics.
See :
https://jmeter.apache.org/usermanual/generating-dashboard.html
I have installed JRuby 1.6.0 on my Windows XP machine. I have also downloaded the Google gdata libraries. This code:
require "java"
$CLASSPATH << "D:\\javalib\\gdata\\java\\lib\\*"
include_class "com.google.gdata.client.docs"
gives this error:
org/jruby/javasupport/JavaClass.java:1052:in `for_name': cannot load Java class
com.google.gdata.client.docs (NameError)
from org/jruby/javasupport/JavaUtilities.java:34:in `get_proxy_class'
from C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/shared/builtin/javasupport/co
re_ext/object.rb:46:in `java_import'
from C:/jruby-1.6.0.RC1/lib/ruby/site_ruby/shared/builtin/javasupport/co
re_ext/object.rb:26:in `include_class'
from download_gdocs.rb:5:in `(root)'
The Google gdata Java libraries are in D:\javalib\gdata\java\lib. For example, if I type jar tvf D:\javalib\gdata\java\lib\gdata-client-1.0.jar I get (in part) this:
0 Fri Feb 04 15:25:54 PST 2011 com/google/gdata/data/docs/
904 Fri Feb 04 15:25:54 PST 2011 com/google/gdata/client/docs/DocsService$Versions.class
6686 Fri Feb 04 15:25:54 PST 2011 com/google/gdata/client/docs/DocsService.class
$CLASSPATH doesn't support glob expressions. Instead, require each .jar individually:
Dir["D:\\javalib\\gdata\\java\\lib\\*.jar"].each { |jar| require jar }