NeRooN
NeRooN
Explore posts from servers
CC#
Created by NeRooN on 7/12/2024 in #help
My NuGet packages are not created
Hello, I'm trying to create a NuGet package and create it directly in a shared folder. The thing is that this library has multiple target frameworks, and when i create the NuGet it doesnt create the .nupkg file in the PublishDir folder. I've tried with only 1 target framework and it works, so it looks like targeting multiple frameworks is the problem here. This is the config of the .csproj:
<PropertyGroup>
<TargetFrameworks>netcoreapp31;net60</TargetFrameworks>
<LangVersion>7.1</LangVersion>
<VersionPrefix>1.0.0</VersionPrefix>
<!--<VersionSuffix>rc.1</VersionSuffix>-->
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>netcoreapp31;net60</TargetFrameworks>
<LangVersion>7.1</LangVersion>
<VersionPrefix>1.0.0</VersionPrefix>
<!--<VersionSuffix>rc.1</VersionSuffix>-->
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
and the FolderProfile.pubxml:
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>\\dev\NuGet</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net60</TargetFramework>
</PropertyGroup>
</Project>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>\\dev\NuGet</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net60</TargetFramework>
</PropertyGroup>
</Project>
as i mentioned, if i change this line:
<TargetFrameworks>netcoreapp31;net60</TargetFrameworks>
<TargetFrameworks>netcoreapp31;net60</TargetFrameworks>
for this:
<TargetFramework>net60</TargetFramework>
<TargetFramework>net60</TargetFramework>
the nupkg file is created under \dev\NuGet Any idea?
134 replies
CC#
Created by NeRooN on 7/9/2024 in #help
Amazon S3 client total request count
Hello, i need some help in something i assume it's easy but i need to be 100% sure. I have an s3client that i use to make some requests to amazon s3. Now i need to log the total GET/POST/PUT/DELETE requests i do. I assume it's only 1 request per call, but to be 100% sure i prefer to ask here how can i check this. The idea is to have methods like:
Public Function GetObjectMetadata(metadataRequest As GetObjectMetadataRequest) As GetObjectMetadataResponse
GetRequests += 1
Return S3Client.GetObjectMetadata(metadataRequest)
End Function
Public Function GetObjectMetadata(metadataRequest As GetObjectMetadataRequest) As GetObjectMetadataResponse
GetRequests += 1
Return S3Client.GetObjectMetadata(metadataRequest)
End Function
so when i do the "GetObjectMetadata" request, it adds 1 to the counter. So i need to be sure every mehtod i call does only 1 request, in case it does some extra requests i should then add something like "PostRequest += 1" or smth like that
29 replies
CC#
Created by NeRooN on 4/17/2024 in #help
Need to edit a outlook mail without interop
Hello, i have a .msg template that i have to work with. First i need to read it, then edit the message and add some email addresses to send it. This has to be dynamic, so i get the data from database and fill it. I cannot use interop library since the server is in azure
1 replies
CC#
Created by NeRooN on 11/9/2023 in #help
❔ Docx to pdf converter
Hello i need to convert docx to PDF using .net6.0 or higher. I cannot use Interop since the server is on azure. Any idea? It must be a free comercial license
17 replies
CC#
Created by NeRooN on 9/14/2023 in #help
❔ Fluent validation custom method
Hello! I am trying to do a generic method to validate all the mails in any DTO i have. Since i have multiple DTO's containing email strings and the rules for all should be always the same, i wanted to do a generic method to keep it simplier to mantain in the long term. I've read the official documentation and i was trying to follow it: public static IRuleBuilderOptions<T, string?> ValidEmail<T, TElement>(this IRuleBuilder<T, string?> ruleBuilder) { } the thing here is i have to check the email domains so they belong to specific domains and i'm achieving this with a .Must(....) and .EmailAddress(). The problem i'm facing is that i only need it to validate the must and the email address only when it's NOT null or empty, so it's optional. But unlike in the Must method, if i do (x =>...) X is from type T instead of string? so how can i do this?
11 replies