'How to Publish an ASP.net in Azure deployment center using Github repository
does anyone know how to add dependencies in the Github workload or I missing somewhere here
I have an ASP.net and I want it to publish inAzure
so far I try azure deployment center in which my Deploy and build code is in Github
My website is fine if I don't use EF. but if I try to add my Class Librady(.net framework 4.7.2) they giving me this error
build: BP.Database/ToothyGrinsModel.Context.cs#L13
The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
build: BP.Database/ToothyGrinsModel.Context.cs#L14
The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
build: BP.Database/ToothyGrinsModel.Context.cs#L16
The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?)
build: BP.Database/ToothyGrinsModel.Context.cs#L23
The type or namespace name 'DbModelBuilder' could not be found (are you missing a using directive or an assembly reference?)
build: BP.Database/ToothyGrinsModel.Context.cs#L28
The type or namespace name 'DbSet<>' could not be found (are you missing a using directive or an assembly reference?)
build: BP.Database/ToothyGrinsModel.Context.cs#L29
The type or namespace name 'DbSet<>' could not be found (are you missing a using directive or an assembly reference?)
build: BP.Database/ToothyGrinsModel.Context.cs#L13
The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
build: BP.Database/ToothyGrinsModel.Context.cs#L14
The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
build: BP.Database/ToothyGrinsModel.Context.cs#L16
The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?)
build: BP.Database/ToothyGrinsModel.Context.cs#L23
The type or namespace name 'DbModelBuilder' could not be found (are you missing a using directive or an assembly reference?)
and the error also was cam from
Build and deploy ASP.Net Core app to Azure Web App
Build with dotnet
Determining projects to restore...
Restored D:\a\ToothygrinsDC\ToothygrinsDC\ToothyGrinsDC.Domain\ToothyGrinsDC.Domain.csproj (in 111 ms).
Restored D:\a\ToothygrinsDC\ToothygrinsDC\IBL\ToothygrinsBusiness.csproj (in 1.79 sec).
D:\a\ToothygrinsDC\ToothygrinsDC\WebApplication1\ToothygrinsDC.csproj(279,3): error MSB4019: The imported project "C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk\6.0.300\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk\6.0.300\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" is correct, and that the file exists on disk.
C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk\6.0.300\Microsoft.Common.CurrentVersion.targets(2302,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "EntityFramework". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\BP.Database.csproj]
C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk\6.0.300\Microsoft.Common.CurrentVersion.targets(2302,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\BP.Database.csproj]
Error: D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\ToothyGrinsModel.Context.cs(13,23): error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) [D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\BP.Database.csproj]
Error: D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\ToothyGrinsModel.Context.cs(14,23): error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) [D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\BP.Database.csproj]
Error: D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\ToothyGrinsModel.Context.cs(16,52): error CS0246: The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?) [D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\BP.Database.csproj]
Error: D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\ToothyGrinsModel.Context.cs(23,49): error CS0246: The type or namespace name 'DbModelBuilder' could not be found (are you missing a using directive or an assembly reference?) [D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\BP.Database.csproj]
Error: D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\ToothyGrinsModel.Context.cs(28,24): error CS0246: The type or namespace name 'DbSet<>' could not be found (are you missing a using directive or an assembly reference?) [D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\BP.Database.csproj]
Error: D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\ToothyGrinsModel.Context.cs(29,24): error CS0246: The type or namespace name 'DbSet<>' could not be found (are you missing a using directive or an assembly reference?) [D:\a\ToothygrinsDC\ToothygrinsDC\BP.Database\BP.Database.csproj]
ToothyGrinsDC.Domain -> D:\a\ToothygrinsDC\ToothygrinsDC\ToothyGrinsDC.Domain\bin\Release\net472\ToothyGrinsDC.Domain.dll
I do know the error could not be found or missing reference but I already add it in my reference and I try to copy local the references but the error is not going away. I'm new to GIT. anything
you'll know is much appreciated.
In my BP.Database(which is my class library(.net framework) .csproj
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{56236403-3735-4DB1-9E41-6B60EADB4EAC}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BP.Database</RootNamespace>
<AssemblyName>BP.Database</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System">
<Private>True</Private>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations">
<Private>True</Private>
</Reference>
<Reference Include="System.Core">
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Serialization">
<Private>True</Private>
</Reference>
<Reference Include="System.Security">
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq">
<Private>True</Private>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp">
<Private>True</Private>
</Reference>
<Reference Include="System.Data">
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http">
<Private>True</Private>
</Reference>
<Reference Include="System.Xml">
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="GetTGService.cs">
<DependentUpon>ToothyGrinsModel.tt</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TGService.cs">
<DependentUpon>ToothyGrinsModel.tt</DependentUpon>
</Compile>
<Compile Include="ToothyGrinsModel.Context.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>ToothyGrinsModel.Context.tt</DependentUpon>
</Compile>
<Compile Include="ToothyGrinsModel.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>ToothyGrinsModel.tt</DependentUpon>
</Compile>
<Compile Include="ToothyGrinsModel.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>ToothyGrinsModel.edmx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EntityDeploy Include="ToothyGrinsModel.edmx">
<Generator>EntityModelCodeGenerator</Generator>
<LastGenOutput>ToothyGrinsModel.Designer.cs</LastGenOutput>
</EntityDeploy>
</ItemGroup>
<ItemGroup>
<None Include="App.Config" />
<None Include="packages.config" />
<None Include="ToothyGrinsModel.edmx.diagram">
<DependentUpon>ToothyGrinsModel.edmx</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="ToothyGrinsModel.Context.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>ToothyGrinsModel.Context.cs</LastGenOutput>
<DependentUpon>ToothyGrinsModel.edmx</DependentUpon>
</Content>
<Content Include="ToothyGrinsModel.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<DependentUpon>ToothyGrinsModel.edmx</DependentUpon>
<LastGenOutput>ToothyGrinsModel.cs</LastGenOutput>
</Content>
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
</Project>
I think is there something wrong in my azure that automatically adding a .yml file in my GitHub after deploying my project. It says ASP.net Core but my project is a ASP.Net
UPDATE:
I try adding entityframeworkcore 2.1.0 and add thi entityframework 4.7.2 i check the my BP.Database.csproj and find this
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
the error above was gone but there is another error comming
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
